1 |
commit: 6c0fa2f0110c90577825ff2d7d056e16d9f9bb9c |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 1 17:15:41 2020 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 1 17:15:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c0fa2f0 |
7 |
|
8 |
sci-libs/scipy-python2: Bump to 1.2.3 |
9 |
|
10 |
Package-Manager: Portage-2.3.96, Repoman-2.3.22 |
11 |
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org> |
12 |
|
13 |
sci-libs/scipy-python2/Manifest | 1 + |
14 |
sci-libs/scipy-python2/scipy-python2-1.2.3.ebuild | 129 ++++++++++++++++++++++ |
15 |
2 files changed, 130 insertions(+) |
16 |
|
17 |
diff --git a/sci-libs/scipy-python2/Manifest b/sci-libs/scipy-python2/Manifest |
18 |
index e9452548014..f554d62f88c 100644 |
19 |
--- a/sci-libs/scipy-python2/Manifest |
20 |
+++ b/sci-libs/scipy-python2/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST scipy-1.1.0.tar.gz 15583560 BLAKE2B 477753e622ee26a3bc8c2cb6829410152df84b29ce17a6d53a66348f5536f7993fedf5d32b782405b54b3af3feabf9bc91c381ed39546076849c2fdb71039404 SHA512 72fe32c6c009613cb78202598e5db14f8e630b3218839cfe18d43d40550d94cc5aa100c6f5d41f40e86ae148e9b6a13431bb91b0f9be44b0569ccd7b725fe973 |
23 |
+DIST scipy-1.2.3.tar.gz 23335997 BLAKE2B 183a0e8266a6fa08ca4fa05511d28f51a5ff9b3e8d00c24a355d2db00327eb973befbefbcf47cb288aafd60718db903ac29f775f519484a7c6d0919693c0a21f SHA512 d7739fa2f25689fc14ddf09477207c990b39b593a85f5c74687df1ffe097f6eee1bb2123aaa286189309f6d3b25cdd7757053d8b1008d1d6b3367a8e3a0a53b1 |
24 |
|
25 |
diff --git a/sci-libs/scipy-python2/scipy-python2-1.2.3.ebuild b/sci-libs/scipy-python2/scipy-python2-1.2.3.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..05b35f960a4 |
28 |
--- /dev/null |
29 |
+++ b/sci-libs/scipy-python2/scipy-python2-1.2.3.ebuild |
30 |
@@ -0,0 +1,129 @@ |
31 |
+# Copyright 1999-2020 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=6 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python2_7 ) |
37 |
+PYTHON_REQ_USE="threads(+)" |
38 |
+ |
39 |
+inherit fortran-2 distutils-r1 flag-o-matic multiprocessing toolchain-funcs |
40 |
+ |
41 |
+MY_PN=${PN/-python2} |
42 |
+MY_P=${MY_PN}-${PV} |
43 |
+ |
44 |
+DESCRIPTION="Scientific algorithms library for Python (py2 version)" |
45 |
+HOMEPAGE="https://www.scipy.org/" |
46 |
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz" |
47 |
+S=${WORKDIR}/${MY_P} |
48 |
+ |
49 |
+LICENSE="BSD LGPL-2" |
50 |
+SLOT="0" |
51 |
+IUSE="sparse test" |
52 |
+RESTRICT="!test? ( test )" |
53 |
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" |
54 |
+ |
55 |
+CDEPEND=" |
56 |
+ || ( |
57 |
+ >=dev-python/numpy-python2-1.10[lapack,${PYTHON_USEDEP}] |
58 |
+ >=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}] |
59 |
+ ) |
60 |
+ sci-libs/arpack:0= |
61 |
+ virtual/cblas |
62 |
+ virtual/lapack |
63 |
+ sparse? ( sci-libs/umfpack:0= )" |
64 |
+DEPEND="${CDEPEND} |
65 |
+ dev-lang/swig |
66 |
+ >=dev-python/cython-0.22[${PYTHON_USEDEP}] |
67 |
+ >=dev-python/setuptools-36[${PYTHON_USEDEP}] |
68 |
+ virtual/pkgconfig |
69 |
+ test? ( |
70 |
+ dev-python/nose[${PYTHON_USEDEP}] |
71 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
72 |
+ )" |
73 |
+RDEPEND="${CDEPEND} |
74 |
+ !<sci-libs/scipy-1.4 |
75 |
+ dev-python/pillow[${PYTHON_USEDEP}]" |
76 |
+ |
77 |
+DOCS=( HACKING.rst.txt THANKS.txt ) |
78 |
+ |
79 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
80 |
+ |
81 |
+pc_incdir() { |
82 |
+ $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ |
83 |
+ sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||' |
84 |
+} |
85 |
+ |
86 |
+pc_libdir() { |
87 |
+ $(tc-getPKG_CONFIG) --libs-only-L $@ | \ |
88 |
+ sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||' |
89 |
+} |
90 |
+ |
91 |
+pc_libs() { |
92 |
+ $(tc-getPKG_CONFIG) --libs-only-l $@ | \ |
93 |
+ sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ |
94 |
+ -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ |
95 |
+ | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' |
96 |
+} |
97 |
+ |
98 |
+python_prepare_all() { |
99 |
+ # scipy automatically detects libraries by default |
100 |
+ export {FFTW,FFTW3,UMFPACK}=None |
101 |
+ use sparse && unset UMFPACK |
102 |
+ # the missing symbols are in -lpythonX.Y, but since the version can |
103 |
+ # differ, we just introduce the same scaryness as on Linux/ELF |
104 |
+ [[ ${CHOST} == *-darwin* ]] \ |
105 |
+ && append-ldflags -bundle "-undefined dynamic_lookup" \ |
106 |
+ || append-ldflags -shared |
107 |
+ [[ -z ${FC} ]] && export FC="$(tc-getFC)" |
108 |
+ # hack to force F77 to be FC until bug #278772 is fixed |
109 |
+ [[ -z ${F77} ]] && export F77="$(tc-getFC)" |
110 |
+ export F90="${FC}" |
111 |
+ export SCIPY_FCONFIG="config_fc --noopt --noarch" |
112 |
+ append-fflags -fPIC |
113 |
+ |
114 |
+ local libdir="${EPREFIX}"/usr/$(get_libdir) |
115 |
+ cat >> site.cfg <<-EOF || die |
116 |
+ [blas] |
117 |
+ include_dirs = $(pc_incdir cblas) |
118 |
+ library_dirs = $(pc_libdir cblas blas):${libdir} |
119 |
+ blas_libs = $(pc_libs cblas blas) |
120 |
+ [lapack] |
121 |
+ library_dirs = $(pc_libdir lapack):${libdir} |
122 |
+ lapack_libs = $(pc_libs lapack) |
123 |
+ EOF |
124 |
+ |
125 |
+ # Drop hashes to force rebuild of cython based .c code |
126 |
+ rm cythonize.dat || die |
127 |
+ |
128 |
+ distutils-r1_python_prepare_all |
129 |
+} |
130 |
+ |
131 |
+python_compile() { |
132 |
+ # FIXME: parallel python building fails, bug #614464 |
133 |
+ ${EPYTHON} tools/cythonize.py || die |
134 |
+ distutils-r1_python_compile \ |
135 |
+ ${SCIPY_FCONFIG} |
136 |
+} |
137 |
+ |
138 |
+python_test() { |
139 |
+ # fails with bdist_egg. should it be fixed in distutils-r1 eclass? |
140 |
+ distutils_install_for_testing ${SCIPY_FCONFIG} |
141 |
+ cd "${TEST_DIR}" || die "no ${TEST_DIR} available" |
142 |
+ "${PYTHON}" -c \ |
143 |
+ 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \ |
144 |
+ || die |
145 |
+ "${EPYTHON}" -c \ |
146 |
+ "import scipy, sys; r = scipy.test('fast', verbose=2); sys.exit(r)" \ |
147 |
+ || die "Tests fail with ${EPYTHON}" |
148 |
+} |
149 |
+ |
150 |
+python_install() { |
151 |
+ distutils-r1_python_install ${SCIPY_FCONFIG} |
152 |
+ python_optimize |
153 |
+} |
154 |
+ |
155 |
+pkg_postinst() { |
156 |
+ elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" |
157 |
+ elog "to your prefered image viewer. Example:" |
158 |
+ elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" |
159 |
+} |