1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
8 inherit distutils-r1 flag-o-matic
10 DESCRIPTION="matplotlib toolkit to plot map projections"
11 HOMEPAGE="https://matplotlib.org/basemap/ https://pypi.python.org/pypi/basemap"
12 SRC_URI="mirror://sourceforge/matplotlib/${P}.tar.gz"
16 KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
19 CDEPEND="sci-libs/shapelib
20 >=dev-python/matplotlib-0.98[${PYTHON_USEDEP}]
21 >=sci-libs/geos-3.3.1[python,${PYTHON_USEDEP}]"
24 dev-python/setuptools[${PYTHON_USEDEP}]"
27 >=dev-python/pupynere-1.0.8[${PYTHON_USEDEP}]
28 dev-python/httplib2[${PYTHON_USEDEP}]
29 dev-python/dap[${PYTHON_USEDEP}]"
31 DOCS="FAQ API_CHANGES"
32 #REQUIRED_USE="test? ( examples )"
33 # The test phase ought never have been onvoked according to the above.
34 # The test phase appears to require the package to fist be emerged, which ...
35 # Until the distutils_install_for_testing func refrains from failing with
36 # mkdir: cannot create directory ‘/test’: Permission denied
37 # reluctantly this phase is assigned
42 -e "s:/usr:${EPREFIX}/usr:g" \
46 -e "/_datadir.*=.*join/s|\(.*datadir.*=\).*|\1'${EROOT}usr/share/${PN}'|g" \
47 "${S}"/lib/mpl_toolkits/basemap/*.py || die
48 distutils-r1_src_prepare
49 append-flags -fno-strict-aliasing
53 # distutils_install_for_testing
57 distutils-r1_python_install
58 # --install-data="${EPREFIX}/usr/share/${PN}" on testing is found not to work;
59 # setup.py is a mess. Someone care to patch setup.py please proceed; substitute with
60 insinto usr/share/basemap/
61 doins lib/mpl_toolkits/basemap/data/*
63 # clean up collision with matplotlib
64 rm -f "${D}$(python_get_sitedir)/mpl_toolkits/__init__.py"
66 rm -fr "${D}$(python_get_sitedir)/mpl_toolkits/basemap/data"
69 python_install_all() {
70 use examples && local EXAMPLES=( examples/. )
71 distutils-r1_python_install_all