Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 484270 - dev-python/basemap-1.2.1 version bump and add python 3 support
Summary: dev-python/basemap-1.2.1 version bump and add python 3 support
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Python Gentoo Team
URL: https://github.com/matplotlib/basemap...
Whiteboard:
Keywords: PMASKED
: 704688 (view as bug list)
Depends on:
Blocks: py3-tracker, python-3-incompatible 665688 704212
  Show dependency tree
 
Reported: 2013-09-08 19:08 UTC by Tiago de Paula Peixoto
Modified: 2020-04-30 10:14 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from basemap-1.0.7-r2 to basemap-1.1.0 (basemap-diff-1.0.7-r2-to-1.1.0.patch,1.19 KB, patch)
2020-01-28 15:42 UTC, MW
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago de Paula Peixoto 2013-09-08 19:08:50 UTC
dev-python/basemap currently perfectly supports python 3, hence it would be nice to have it enabled in the ebuild, which currently restricts it to python 2.
Comment 1 Tomas Psika 2015-04-04 17:14:11 UTC
I have removed sci-libs/geos dependency from ebuild (it seems to be bundled inside basemap itself) and dev-python/purynere dependency (have not found anything about it in the sources). It seems to work (partially?), at least using python 3.3.

Tests in /usr/lib/python3.3/site-packages/mpl_toolkits/basemap/test.py passed.

Do not know if this change could be considered safe.

Diff against basemap-1.0.7-r1.ebuild follows:

-PYTHON_COMPAT=( python2_7 )
+PYTHON_COMPAT=( python{2_7,3_3} )
 
@@ -20,4 +20,3 @@
 CDEPEND="sci-libs/shapelib
-       >=dev-python/matplotlib-0.98[${PYTHON_USEDEP}]
-       >=sci-libs/geos-3.3.1[python,${PYTHON_USEDEP}]"
+       >=dev-python/matplotlib-0.98[${PYTHON_USEDEP}]"
 
@@ -27,5 +26,3 @@
 RDEPEND="${CDEPEND}
-       >=dev-python/pupynere-1.0.8[${PYTHON_USEDEP}]
-       dev-python/httplib2[${PYTHON_USEDEP}]
-       dev-python/dap[${PYTHON_USEDEP}]"
+       dev-python/httplib2[${PYTHON_USEDEP}]"
Comment 2 Thomas Beierlein gentoo-dev 2018-02-24 10:20:41 UTC
Any news on this? Could need it for actual sci-visualization/pythonprop.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-22 09:16:14 UTC
This ebuild looks horribly bad.  If someone wants to fix it, be my guest.
Comment 4 MW 2019-03-04 15:43:24 UTC
Changes suggested by Tomas brings a working basemap into python-3.6.5 here.

Michał, if the current ebuild is horrible, can't we at least make it an epsilon less bad by just enabling python3 support? Cleanup/rewrite might be nice to wish for, but it should not hold up essential functionality like this.
Comment 5 Andreas Sturmlechner gentoo-dev 2019-12-29 20:15:57 UTC
Dependency on sci-libs/geos[python] should be reviewed.
Comment 6 Andreas Sturmlechner gentoo-dev 2020-01-03 10:34:40 UTC
*** Bug 704688 has been marked as a duplicate of this bug. ***
Comment 7 Thomas Beutin 2020-01-06 14:04:18 UTC
Hm, i don't know why my bug 704688 is a duplicate of this bug, and i'm pretty confident that i was able to compile sci-libs/geos-3.8.0 after 2017, so where is the real source of the current failure?

Any help/ explanation appreciated!
Comment 8 MW 2020-01-28 15:42:01 UTC
Created attachment 605890 [details, diff]
Patch from basemap-1.0.7-r2 to basemap-1.1.0

Solution proposed by Tomas still works, nearly five years later...

Currently, the problem with basemap is not python3 support, but rather the missing runtime dependencies which have been allowed to accumulate owing to sheer lethargy involved in enabling python3 in the ebuild. The attached patch (based on Tomas' changes) brings basemap-1.1.0 into python-3.6.9, but there may still be additional missing dependencies.

In any case, basemap is being deprecated in favour of cartopy (https://scitools.org.uk/cartopy/docs/latest/), which is not yet in the tree.
Comment 9 Andreas Sturmlechner gentoo-dev 2020-01-29 22:04:28 UTC
(In reply to MW from comment #8)
> Created attachment 605890 [details, diff] [details, diff]
> Patch from basemap-1.0.7-r2 to basemap-1.1.0

Taking a look at it, this is impossible:

PYTHON_COMPAT=( python3_6 )
...
    >=sci-libs/geos-3.3.1[${PYTHON_USEDEP}]"


sci-libs/geos will never provide python3 support as it has been dropped upstream in favor of Shapely.
Comment 10 MW 2020-01-29 22:18:08 UTC
(In reply to Andreas Sturmlechner from comment #9)
> Taking a look at it, this is impossible:
> 
> PYTHON_COMPAT=( python3_6 )
> ...
>     >=sci-libs/geos-3.3.1[${PYTHON_USEDEP}]"
> 
> 
> sci-libs/geos will never provide python3 support as it has been dropped
> upstream in favor of Shapely.

I forgot that I have my own local version of =sci-libs/geos-3.7.0. However, the only change I have made is to set

PYTHON_COMPAT=( python3_6 )
Comment 11 Andreas Sturmlechner gentoo-dev 2020-01-30 20:12:39 UTC
My point is that you can't do this as long as you depend on geos[$PYTHON_USEDEP].
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-01-30 20:48:55 UTC
No python3, plz, unless you are going to fix sci-visualization/pythonprop as well.  Otherwise, this package is on its way out along with it.
Comment 13 Thomas Beierlein gentoo-dev 2020-03-26 06:41:14 UTC
(In reply to Michał Górny from comment #12)
> No python3, plz, unless you are going to fix sci-visualization/pythonprop as
> well.  Otherwise, this package is on its way out along with it.

sci-vizualization/pythonprop switched away from basemap to cardopy in version 0.29. So I will try to bring cardopy to the tree in next days.