1 |
commit: 2ff9510d975f320f672ad4444fbd0ddbde264a4a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 31 08:15:58 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 31 10:14:36 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2ff9510d |
7 |
|
8 |
dev-python/scipy: Bump to 1.6.2 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/scipy/Manifest | 3 + |
13 |
dev-python/scipy/scipy-1.6.2.ebuild | 155 ++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 158 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/scipy/Manifest b/dev-python/scipy/Manifest |
17 |
index 13ed408f42a..17559e4b9c1 100644 |
18 |
--- a/dev-python/scipy/Manifest |
19 |
+++ b/dev-python/scipy/Manifest |
20 |
@@ -19,3 +19,6 @@ DIST scipy-1.6.0.tar.gz 27275413 BLAKE2B f65fca81a21a3077ead119123fc3bb2ed96aaac |
21 |
DIST scipy-1.6.1-html.zip 23946591 BLAKE2B d3464c342b1d4f43e17e214c7557737913bf4131f88b9d569cff106c75dc7ebf0d065283792fddc189e2a3ddc322f1b2b4f38c6d313569f28395e79680060b58 SHA512 73561f9daa303c6e967f9b11952c6239dea7ff1a2fa02434354ac78fcffe7a552aa0f1043a17cb5c35a442def499eff199856cca8efa1415449cbf54f0d4913b |
22 |
DIST scipy-1.6.1-ref.pdf 34594740 BLAKE2B 905ddcd7a3d462b09ded688f0818204d7684fa18058d0dac480d0a000e9ea0b7ebcdd33c01adae17234dcdf630d4aef9078174127af46f1db55d5c14b3245346 SHA512 355f4681439c1720f45dca6badfe72d77edfca0962fd9b42df34f1cd8fff7121fa6e7f60570bb638abd3ba9693930fa46b25af862d8fc1568b508c6fdd785479 |
23 |
DIST scipy-1.6.1.tar.gz 27346828 BLAKE2B 147d7b3f796023fe557f07b46eefa1b23631106556ff56bb0ab5640d7dccfa86fecc2031ba0571eee2560a9bf86705a5ef32527852650e6d0629a722574bf135 SHA512 778a7bca15bb880a3fd1c3d46ef753920335eca95fe5f2b8512883a2aec1bb8e9d8a8fdbf4fee90e823e31980408a51451cc53d4f10c632cd72faf2856c868c8 |
24 |
+DIST scipy-1.6.2.tar.gz 27187804 BLAKE2B af3578bc029c3af548c04144d7405ac8e6f8e057f870394e124f24aea9989120275407e5a7fdd29fbe1019d2acc295c1ce00872461ecf3a325000e8817cd559f SHA512 18b03f32e8343c5a6c6148ac0bfd4b5f2cc9ff5f74d5d41761ae9e773d6af8774c7b09a3fcc47122864eccce1dbbc17e9325819885d3fc3ab2baf98e7d3befa4 |
25 |
+DIST scipy-html-1.6.1.zip 23946591 BLAKE2B d3464c342b1d4f43e17e214c7557737913bf4131f88b9d569cff106c75dc7ebf0d065283792fddc189e2a3ddc322f1b2b4f38c6d313569f28395e79680060b58 SHA512 73561f9daa303c6e967f9b11952c6239dea7ff1a2fa02434354ac78fcffe7a552aa0f1043a17cb5c35a442def499eff199856cca8efa1415449cbf54f0d4913b |
26 |
+DIST scipy-ref-1.6.1.pdf 34594740 BLAKE2B 905ddcd7a3d462b09ded688f0818204d7684fa18058d0dac480d0a000e9ea0b7ebcdd33c01adae17234dcdf630d4aef9078174127af46f1db55d5c14b3245346 SHA512 355f4681439c1720f45dca6badfe72d77edfca0962fd9b42df34f1cd8fff7121fa6e7f60570bb638abd3ba9693930fa46b25af862d8fc1568b508c6fdd785479 |
27 |
|
28 |
diff --git a/dev-python/scipy/scipy-1.6.2.ebuild b/dev-python/scipy/scipy-1.6.2.ebuild |
29 |
new file mode 100644 |
30 |
index 00000000000..9bbfd69f4ac |
31 |
--- /dev/null |
32 |
+++ b/dev-python/scipy/scipy-1.6.2.ebuild |
33 |
@@ -0,0 +1,155 @@ |
34 |
+# Copyright 1999-2021 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+PYTHON_COMPAT=( python3_{7..9} ) |
40 |
+PYTHON_REQ_USE="threads(+)" |
41 |
+ |
42 |
+inherit fortran-2 distutils-r1 flag-o-matic multiprocessing toolchain-funcs |
43 |
+ |
44 |
+# upstream is slacking forever with doc updates |
45 |
+DOC_PV=1.6.1 |
46 |
+DESCRIPTION="Scientific algorithms library for Python" |
47 |
+HOMEPAGE="https://www.scipy.org/" |
48 |
+SRC_URI=" |
49 |
+ mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz |
50 |
+ doc? ( |
51 |
+ https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip |
52 |
+ https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${DOC_PV}.pdf |
53 |
+ )" |
54 |
+ |
55 |
+LICENSE="BSD LGPL-2" |
56 |
+SLOT="0" |
57 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos" |
58 |
+IUSE="doc sparse" |
59 |
+ |
60 |
+DEPEND=" |
61 |
+ >=dev-python/numpy-1.16.5[lapack,${PYTHON_USEDEP}] |
62 |
+ sci-libs/arpack:0= |
63 |
+ virtual/cblas |
64 |
+ virtual/lapack |
65 |
+ sparse? ( sci-libs/umfpack:0= )" |
66 |
+RDEPEND="${DEPEND} |
67 |
+ dev-python/pillow[${PYTHON_USEDEP}]" |
68 |
+BDEPEND=" |
69 |
+ dev-lang/swig |
70 |
+ >=dev-python/cython-0.29.13[${PYTHON_USEDEP}] |
71 |
+ dev-python/pybind11[${PYTHON_USEDEP}] |
72 |
+ virtual/pkgconfig |
73 |
+ doc? ( app-arch/unzip ) |
74 |
+ test? ( |
75 |
+ dev-python/nose[${PYTHON_USEDEP}] |
76 |
+ )" |
77 |
+ |
78 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
79 |
+ |
80 |
+distutils_enable_tests pytest |
81 |
+ |
82 |
+src_unpack() { |
83 |
+ default |
84 |
+ if use doc; then |
85 |
+ unzip -qo "${DISTDIR}"/${PN}-html-${DOC_PV}.zip -d html || die |
86 |
+ fi |
87 |
+} |
88 |
+ |
89 |
+pc_incdir() { |
90 |
+ $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ |
91 |
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||' |
92 |
+} |
93 |
+ |
94 |
+pc_libdir() { |
95 |
+ $(tc-getPKG_CONFIG) --libs-only-L $@ | \ |
96 |
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||' |
97 |
+} |
98 |
+ |
99 |
+pc_libs() { |
100 |
+ $(tc-getPKG_CONFIG) --libs-only-l $@ | \ |
101 |
+ sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ |
102 |
+ -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ |
103 |
+ | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' |
104 |
+} |
105 |
+ |
106 |
+python_prepare_all() { |
107 |
+ # scipy automatically detects libraries by default |
108 |
+ export {FFTW,FFTW3,UMFPACK}=None |
109 |
+ use sparse && unset UMFPACK |
110 |
+ # the missing symbols are in -lpythonX.Y, but since the version can |
111 |
+ # differ, we just introduce the same scaryness as on Linux/ELF |
112 |
+ [[ ${CHOST} == *-darwin* ]] \ |
113 |
+ && append-ldflags -bundle "-undefined dynamic_lookup" \ |
114 |
+ || append-ldflags -shared |
115 |
+ [[ -z ${FC} ]] && export FC="$(tc-getFC)" |
116 |
+ # hack to force F77 to be FC until bug #278772 is fixed |
117 |
+ [[ -z ${F77} ]] && export F77="$(tc-getFC)" |
118 |
+ export F90="${FC}" |
119 |
+ export SCIPY_FCONFIG="config_fc --noopt --noarch" |
120 |
+ append-fflags -fPIC |
121 |
+ |
122 |
+ local libdir="${EPREFIX}"/usr/$(get_libdir) |
123 |
+ cat >> site.cfg <<-EOF || die |
124 |
+ [blas] |
125 |
+ include_dirs = $(pc_incdir cblas) |
126 |
+ library_dirs = $(pc_libdir cblas blas):${libdir} |
127 |
+ blas_libs = $(pc_libs cblas blas) |
128 |
+ [lapack] |
129 |
+ library_dirs = $(pc_libdir lapack):${libdir} |
130 |
+ lapack_libs = $(pc_libs lapack) |
131 |
+ EOF |
132 |
+ cat >> setup.cfg <<-EOF || die |
133 |
+ [options] |
134 |
+ zip_safe = False |
135 |
+ EOF |
136 |
+ |
137 |
+ # Drop hashes to force rebuild of cython based .c code |
138 |
+ rm cythonize.dat || die |
139 |
+ |
140 |
+ # TODO |
141 |
+ sed -e "s:== 'levy_stable':in ('levy_stable', 'crystalball', 'ncf'):" \ |
142 |
+ -i scipy/stats/tests/test_continuous_basic.py || die |
143 |
+ |
144 |
+ distutils-r1_python_prepare_all |
145 |
+} |
146 |
+ |
147 |
+python_configure_all() { |
148 |
+ # bug 721860 |
149 |
+ test-flag-FC -fallow-argument-mismatch && |
150 |
+ append-fflags -fallow-argument-mismatch |
151 |
+} |
152 |
+ |
153 |
+python_compile() { |
154 |
+ # FIXME: parallel python building fails, bug #614464 |
155 |
+ export MAKEOPTS=-j1 |
156 |
+ |
157 |
+ ${EPYTHON} tools/cythonize.py || die |
158 |
+ distutils-r1_python_compile \ |
159 |
+ ${SCIPY_FCONFIG} |
160 |
+} |
161 |
+ |
162 |
+python_test() { |
163 |
+ # fails with bdist_egg. should it be fixed in distutils-r1 eclass? |
164 |
+ distutils_install_for_testing ${SCIPY_FCONFIG} |
165 |
+ cd "${TEST_DIR}/lib" || die "no ${TEST_DIR} available" |
166 |
+ PYTHONPATH=. "${EPYTHON}" -c " |
167 |
+import scipy, sys |
168 |
+r = scipy.test('fast', verbose=2) |
169 |
+sys.exit(0 if r else 1)" || die "Tests fail with ${EPYTHON}" |
170 |
+} |
171 |
+ |
172 |
+python_install_all() { |
173 |
+ use doc && \ |
174 |
+ local DOCS=( "${DISTDIR}"/${PN}-ref-${DOC_PV}.pdf ) \ |
175 |
+ local HTML_DOCS=( "${WORKDIR}"/html/. ) |
176 |
+ distutils-r1_python_install_all |
177 |
+} |
178 |
+ |
179 |
+python_install() { |
180 |
+ distutils-r1_python_install ${SCIPY_FCONFIG} |
181 |
+ python_optimize |
182 |
+} |
183 |
+ |
184 |
+pkg_postinst() { |
185 |
+ elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" |
186 |
+ elog "to your prefered image viewer. Example:" |
187 |
+ elog " echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" |
188 |
+} |