Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/basemap/
Date: Sat, 17 Feb 2018 13:07:38
Message-Id: 1518872846.dfa62786a8d8ad5afa22339d73f918d681104502.mgorny@gentoo
1 commit: dfa62786a8d8ad5afa22339d73f918d681104502
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 17 12:58:00 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 17 13:07:26 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfa62786
7
8 dev-python/basemap: Strip mpltoolkits/__init__.py correctly
9
10 Closes: https://bugs.gentoo.org/647850
11
12 dev-python/basemap/basemap-1.0.7-r2.ebuild | 72 ++++++++++++++++++++++++++++++
13 1 file changed, 72 insertions(+)
14
15 diff --git a/dev-python/basemap/basemap-1.0.7-r2.ebuild b/dev-python/basemap/basemap-1.0.7-r2.ebuild
16 new file mode 100644
17 index 00000000000..3b90867698e
18 --- /dev/null
19 +++ b/dev-python/basemap/basemap-1.0.7-r2.ebuild
20 @@ -0,0 +1,72 @@
21 +# Copyright 1999-2018 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +
24 +EAPI=5
25 +
26 +PYTHON_COMPAT=( python2_7 )
27 +
28 +inherit distutils-r1 flag-o-matic
29 +
30 +DESCRIPTION="matplotlib toolkit to plot map projections"
31 +HOMEPAGE="http://matplotlib.org/basemap/ https://pypi.python.org/pypi/basemap"
32 +SRC_URI="mirror://sourceforge/matplotlib/${P}.tar.gz"
33 +
34 +IUSE="examples test"
35 +SLOT="0"
36 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
37 +LICENSE="MIT GPL-2"
38 +
39 +CDEPEND="sci-libs/shapelib
40 + >=dev-python/matplotlib-0.98[${PYTHON_USEDEP}]
41 + >=sci-libs/geos-3.3.1[python,${PYTHON_USEDEP}]"
42 +
43 +DEPEND="${CDEPEND}
44 + dev-python/setuptools[${PYTHON_USEDEP}]"
45 +
46 +RDEPEND="${CDEPEND}
47 + >=dev-python/pupynere-1.0.8[${PYTHON_USEDEP}]
48 + dev-python/httplib2[${PYTHON_USEDEP}]
49 + dev-python/dap[${PYTHON_USEDEP}]"
50 +
51 +DOCS="FAQ API_CHANGES"
52 +#REQUIRED_USE="test? ( examples )"
53 +# The test phase ought never have been onvoked according to the above.
54 +# The test phase appears to require the package to fist be emerged, which ...
55 +# Until the distutils_install_for_testing func refrains from failing with
56 +# mkdir: cannot create directory ‘/test’: Permission denied
57 +# reluctantly this phase is assigned
58 +RESTRICT="test"
59 +
60 +src_prepare() {
61 + sed -i \
62 + -e "s:/usr:${EPREFIX}/usr:g" \
63 + setup.py || die
64 + # use /usr/share/data
65 + sed -i \
66 + -e "/_datadir.*=.*join/s|\(.*datadir.*=\).*|\1'${EROOT}usr/share/${PN}'|g" \
67 + "${S}"/lib/mpl_toolkits/basemap/*.py || die
68 + distutils-r1_src_prepare
69 + append-flags -fno-strict-aliasing
70 +}
71 +
72 +#src_test() {
73 +# distutils_install_for_testing
74 +#}
75 +
76 +python_install() {
77 + # mpl_toolkits namespace provided by dev-python/matplotlib
78 + rm "${BUILD_DIR}/lib/mpl_toolkits/__init__.py" || die
79 + distutils-r1_python_install --skip-build
80 + # --install-data="${EPREFIX}/usr/share/${PN}" on testing is found not to work;
81 + # setup.py is a mess. Someone care to patch setup.py please proceed; substitute with
82 + insinto /usr/share/basemap/
83 + doins lib/mpl_toolkits/basemap/data/*
84 +
85 + # respect FHS
86 + rm -r "${D}$(python_get_sitedir)/mpl_toolkits/basemap/data" || die
87 +}
88 +
89 +python_install_all() {
90 + use examples && local EXAMPLES=( examples/. )
91 + distutils-r1_python_install_all
92 +}