1 |
commit: d3b73b4b2ba690e533be8866c1f8b3caef9f59e3 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 6 05:52:40 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 6 05:53:07 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3b73b4b |
7 |
|
8 |
dev-python/scipy: add 1.7.2 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
dev-python/scipy/Manifest | 3 + |
13 |
dev-python/scipy/scipy-1.7.2.ebuild | 185 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 188 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/scipy/Manifest b/dev-python/scipy/Manifest |
17 |
index c8c120cd8eb..8219933ad78 100644 |
18 |
--- a/dev-python/scipy/Manifest |
19 |
+++ b/dev-python/scipy/Manifest |
20 |
@@ -1,7 +1,10 @@ |
21 |
DIST scipy-1.6.2.tar.gz 27187804 BLAKE2B af3578bc029c3af548c04144d7405ac8e6f8e057f870394e124f24aea9989120275407e5a7fdd29fbe1019d2acc295c1ce00872461ecf3a325000e8817cd559f SHA512 18b03f32e8343c5a6c6148ac0bfd4b5f2cc9ff5f74d5d41761ae9e773d6af8774c7b09a3fcc47122864eccce1dbbc17e9325819885d3fc3ab2baf98e7d3befa4 |
22 |
DIST scipy-1.6.3.tar.gz 27187987 BLAKE2B 30f7171ca0dc0842f254472f4b52c0b0ad4389964a140cc4b94f9d85437c5a7da238c082be503242d433f1d3c65c3fd4afeb2f7831eea39ce303077406e718df SHA512 10ff25da84ce09ae231e781873902d8040d79868721d75a3f9facee177e7f46f7c9c34374feee6fe2253ddd968716d2993658ce514c4ac0c98d255c06a6ef808 |
23 |
DIST scipy-1.7.1.tar.gz 36102628 BLAKE2B 67a414d863c61bf419fa907b9bed53b57beedc20d71d0630fac9719f02e951ea79b893d0803b385936a7c04a6c2f723d3870f0498f71e3c210ccd6ee75a009dc SHA512 81fea7e4f5fbcd537d662273507b6ac75bd4cf900567da8083ac86fb06d9f96b010d01a1697db53211440f0fdb2d89510313bafd3d383284d0ab9a08311dd102 |
24 |
+DIST scipy-1.7.2.tar.gz 36104529 BLAKE2B 8e31a71e8cd69a83e1b60747a01e34f79e42664089a2c41aa263c1697a689464fde0b467063e0ae3bafa37721294a79e21d0eedc6023c1558aea6e0105aefeae SHA512 87596430571ff2a43f067eaaf3254c0841dac82b9152cb64040f1a4d9bc5429aebc31c619ce55d74727f2a79567dfef4acbc6252c24c46d3c8849f97e6e8cfef |
25 |
DIST scipy-html-1.6.1.zip 23946591 BLAKE2B d3464c342b1d4f43e17e214c7557737913bf4131f88b9d569cff106c75dc7ebf0d065283792fddc189e2a3ddc322f1b2b4f38c6d313569f28395e79680060b58 SHA512 73561f9daa303c6e967f9b11952c6239dea7ff1a2fa02434354ac78fcffe7a552aa0f1043a17cb5c35a442def499eff199856cca8efa1415449cbf54f0d4913b |
26 |
DIST scipy-html-1.6.2.zip 23947380 BLAKE2B e4616a157c037b0830fc32d23678fb7e8ebe023d1fd9f0f762695a0d93bc56e432e441e675ec3c7a7d6586a665f6127ce49d570f1716876e58afb402761f8e95 SHA512 119a2227a808c752a751bc7bec6463da739c68391ebac8d2451998d90ebe03b2af401adbf987f0b694244e715c0ef1fd86c2f4a36c48dbb1ff7cdf4d914875df |
27 |
+DIST scipy-html-1.7.1.zip 32435246 BLAKE2B fd8173da41aba95a14b1376f848bc668c4659bf1bbbdd0f87d926633d36f29c039957d38be145a5583010ebd83f6458090f75bdad773cc0f1591664e13c04c20 SHA512 ee59722878f6ef2d2319cdf4e6a60d3d1184f7c22752f9a8859eaa46fb677ebac9e8eef9c0826998e12bac9399e336799843341ef203224a82c9101347149672 |
28 |
DIST scipy-ref-1.6.1.pdf 34594740 BLAKE2B 905ddcd7a3d462b09ded688f0818204d7684fa18058d0dac480d0a000e9ea0b7ebcdd33c01adae17234dcdf630d4aef9078174127af46f1db55d5c14b3245346 SHA512 355f4681439c1720f45dca6badfe72d77edfca0962fd9b42df34f1cd8fff7121fa6e7f60570bb638abd3ba9693930fa46b25af862d8fc1568b508c6fdd785479 |
29 |
DIST scipy-ref-1.6.2.pdf 34599668 BLAKE2B 9ae3221c814eb0d1b1e9191e08000955af503f6448cf8b5841e400fad106c658670339219f4838bd312023601776fe0b0d123ebbd41460c478145da2ac3e9989 SHA512 9aecb7ca760805c470c41121268281c9547aef35ddf078816c5e48f7cf4912a67cf622e267152c6cc823df9d82be1f3a875d97469169d0d91d6219164c130c88 |
30 |
+DIST scipy-ref-1.7.1.pdf 33542025 BLAKE2B 6c978f06b770805f0fae06db740e8596658d98bbbc93c865127eae909957503bb38e02a9c97319aed07608718f8f373374b1cf3a8c3bd624aa3143f1d21bc428 SHA512 45720dc299594bac5c7539f950a0ff135b125d86bfe9847032cbff1f294601fefd0a1ac3fd7e3928b2702390c318ae2f8adca6403ba06ea1ded705fcff94ab79 |
31 |
|
32 |
diff --git a/dev-python/scipy/scipy-1.7.2.ebuild b/dev-python/scipy/scipy-1.7.2.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..7290265e9ab |
35 |
--- /dev/null |
36 |
+++ b/dev-python/scipy/scipy-1.7.2.ebuild |
37 |
@@ -0,0 +1,185 @@ |
38 |
+# Copyright 1999-2021 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=7 |
42 |
+ |
43 |
+PYTHON_COMPAT=( python3_{8..10} ) |
44 |
+PYTHON_REQ_USE="threads(+)" |
45 |
+ |
46 |
+inherit fortran-2 distutils-r1 flag-o-matic toolchain-funcs |
47 |
+ |
48 |
+# upstream is slacking forever with doc updates |
49 |
+DOC_PV=1.7.1 |
50 |
+DESCRIPTION="Scientific algorithms library for Python" |
51 |
+HOMEPAGE="https://www.scipy.org/" |
52 |
+SRC_URI=" |
53 |
+ mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz |
54 |
+ doc? ( |
55 |
+ https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip |
56 |
+ https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${DOC_PV}.pdf |
57 |
+ )" |
58 |
+ |
59 |
+LICENSE="BSD LGPL-2" |
60 |
+SLOT="0" |
61 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~riscv ~s390 ~sparc ~x86" |
62 |
+IUSE="doc +pythran sparse" |
63 |
+ |
64 |
+DEPEND=" |
65 |
+ >=dev-python/numpy-1.16.5[lapack,${PYTHON_USEDEP}] |
66 |
+ sci-libs/arpack:0= |
67 |
+ virtual/cblas |
68 |
+ virtual/lapack |
69 |
+ sparse? ( sci-libs/umfpack:0= )" |
70 |
+RDEPEND="${DEPEND} |
71 |
+ dev-python/pillow[${PYTHON_USEDEP}]" |
72 |
+BDEPEND=" |
73 |
+ dev-lang/swig |
74 |
+ >=dev-python/cython-0.29.18[${PYTHON_USEDEP}] |
75 |
+ dev-python/pybind11[${PYTHON_USEDEP}] |
76 |
+ virtual/pkgconfig |
77 |
+ doc? ( app-arch/unzip ) |
78 |
+ pythran? ( dev-python/pythran[${PYTHON_USEDEP}] ) |
79 |
+ test? ( |
80 |
+ dev-python/nose[${PYTHON_USEDEP}] |
81 |
+ )" |
82 |
+ |
83 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
84 |
+ |
85 |
+distutils_enable_tests pytest |
86 |
+ |
87 |
+PATCHES=( |
88 |
+ "${FILESDIR}"/${PN}-1.7.1-pythran-tests-32-bit.patch |
89 |
+) |
90 |
+ |
91 |
+src_unpack() { |
92 |
+ default |
93 |
+ if use doc; then |
94 |
+ unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die |
95 |
+ fi |
96 |
+} |
97 |
+ |
98 |
+pc_incdir() { |
99 |
+ $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ |
100 |
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||' |
101 |
+} |
102 |
+ |
103 |
+pc_libdir() { |
104 |
+ $(tc-getPKG_CONFIG) --libs-only-L $@ | \ |
105 |
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||' |
106 |
+} |
107 |
+ |
108 |
+pc_libs() { |
109 |
+ $(tc-getPKG_CONFIG) --libs-only-l $@ | \ |
110 |
+ sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ |
111 |
+ -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ |
112 |
+ | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' |
113 |
+} |
114 |
+ |
115 |
+python_prepare_all() { |
116 |
+ # scipy automatically detects libraries by default |
117 |
+ export {FFTW,FFTW3,UMFPACK}=None |
118 |
+ use sparse && unset UMFPACK |
119 |
+ # the missing symbols are in -lpythonX.Y, but since the version can |
120 |
+ # differ, we just introduce the same scaryness as on Linux/ELF |
121 |
+ [[ ${CHOST} == *-darwin* ]] \ |
122 |
+ && append-ldflags -bundle "-undefined dynamic_lookup" \ |
123 |
+ || append-ldflags -shared |
124 |
+ [[ -z ${FC} ]] && export FC="$(tc-getFC)" |
125 |
+ # hack to force F77 to be FC until bug #278772 is fixed |
126 |
+ [[ -z ${F77} ]] && export F77="$(tc-getFC)" |
127 |
+ export F90="${FC}" |
128 |
+ export SCIPY_FCONFIG="config_fc --noopt --noarch" |
129 |
+ append-fflags -fPIC |
130 |
+ |
131 |
+ local libdir="${EPREFIX}"/usr/$(get_libdir) |
132 |
+ cat >> site.cfg <<-EOF || die |
133 |
+ [blas] |
134 |
+ include_dirs = $(pc_incdir cblas) |
135 |
+ library_dirs = $(pc_libdir cblas blas):${libdir} |
136 |
+ blas_libs = $(pc_libs cblas blas) |
137 |
+ [lapack] |
138 |
+ library_dirs = $(pc_libdir lapack):${libdir} |
139 |
+ lapack_libs = $(pc_libs lapack) |
140 |
+ EOF |
141 |
+ cat >> setup.cfg <<-EOF || die |
142 |
+ [options] |
143 |
+ zip_safe = False |
144 |
+ EOF |
145 |
+ |
146 |
+ # TODO |
147 |
+ sed -e "s:== 'levy_stable':in ('levy_stable', 'crystalball', 'ncf'):" \ |
148 |
+ -i scipy/stats/tests/test_continuous_basic.py || die |
149 |
+ |
150 |
+ # Skip known-failing test. Broken on all versions in Gentoo for years. |
151 |
+ # bug #743295 |
152 |
+ sed -e 's:test_bisplev_integer_overflow:_&:' \ |
153 |
+ -i scipy/interpolate/tests/test_fitpack.py || die |
154 |
+ |
155 |
+ # Skip a few 32-bit related failures |
156 |
+ if use x86 ; then |
157 |
+ # TODO: Tidy this up and switch to epytest |
158 |
+ sed -i -e 's:test_nd_axis_m1:_&:' \ |
159 |
+ -e 's:test_nd_axis_0:_&:' \ |
160 |
+ -e 's:test_maxiter_worsening:_&:' \ |
161 |
+ -e 's:test_pdist_jensenshannon_iris:_&:' \ |
162 |
+ -e 's:test_align_vectors_single_vector:_&:' \ |
163 |
+ scipy/signal/tests/test_spectral.py \ |
164 |
+ scipy/sparse/linalg/isolve/tests/test_iterative.py \ |
165 |
+ scipy/spatial/tests/test_distance.py \ |
166 |
+ scipy/spatial/transform/tests/test_rotation.py || die |
167 |
+ fi |
168 |
+ |
169 |
+ if has_version ">=sci-libs/lapack-3.10"; then |
170 |
+ sed -e 's:test_sort(:_&:' \ |
171 |
+ -i scipy/linalg/tests/test_decomp.py || die |
172 |
+ sed -e 's:test_solve_discrete_are:_&:' \ |
173 |
+ -i scipy/linalg/tests/test_solvers.py || die |
174 |
+ fi |
175 |
+ |
176 |
+ distutils-r1_python_prepare_all |
177 |
+} |
178 |
+ |
179 |
+python_configure_all() { |
180 |
+ export SCIPY_USE_PYTHRAN=$(usex pythran 1 0) |
181 |
+ |
182 |
+ # bug 721860 |
183 |
+ test-flag-FC -fallow-argument-mismatch && |
184 |
+ append-fflags -fallow-argument-mismatch |
185 |
+} |
186 |
+ |
187 |
+python_compile() { |
188 |
+ # FIXME: parallel python building fails, bug #614464 |
189 |
+ export MAKEOPTS=-j1 |
190 |
+ |
191 |
+ ${EPYTHON} tools/cythonize.py || die |
192 |
+ distutils-r1_python_compile \ |
193 |
+ ${SCIPY_FCONFIG} |
194 |
+} |
195 |
+ |
196 |
+python_test() { |
197 |
+ # fails with bdist_egg. should it be fixed in distutils-r1 eclass? |
198 |
+ distutils_install_for_testing ${SCIPY_FCONFIG} |
199 |
+ cd "${TEST_DIR}/lib" || die "no ${TEST_DIR} available" |
200 |
+ PYTHONPATH=. "${EPYTHON}" -c " |
201 |
+import scipy, sys |
202 |
+r = scipy.test('fast', verbose=2) |
203 |
+sys.exit(0 if r else 1)" || die "Tests fail with ${EPYTHON}" |
204 |
+} |
205 |
+ |
206 |
+python_install_all() { |
207 |
+ use doc && \ |
208 |
+ local DOCS=( "${DISTDIR}"/${PN}-ref-${DOC_PV}.pdf ) \ |
209 |
+ local HTML_DOCS=( "${WORKDIR}"/html/. ) |
210 |
+ distutils-r1_python_install_all |
211 |
+} |
212 |
+ |
213 |
+python_install() { |
214 |
+ distutils-r1_python_install ${SCIPY_FCONFIG} |
215 |
+ python_optimize |
216 |
+} |
217 |
+ |
218 |
+pkg_postinst() { |
219 |
+ elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" |
220 |
+ elog "to your prefered image viewer. Example:" |
221 |
+ elog " echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" |
222 |
+} |