diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/scipy |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/scipy')
-rw-r--r-- | sci-libs/scipy/Manifest | 19 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.12.0-blitz.patch | 28 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch | 15 | ||||
-rw-r--r-- | sci-libs/scipy/files/scipy-0.16.1-glibc-2.22-backport.patch | 30 | ||||
-rw-r--r-- | sci-libs/scipy/metadata.xml | 23 | ||||
-rw-r--r-- | sci-libs/scipy/scipy-0.16.1.ebuild | 148 | ||||
-rw-r--r-- | sci-libs/scipy/scipy-0.18.1.ebuild | 146 | ||||
-rw-r--r-- | sci-libs/scipy/scipy-0.19.1.ebuild | 142 | ||||
-rw-r--r-- | sci-libs/scipy/scipy-9999.ebuild | 125 |
9 files changed, 676 insertions, 0 deletions
diff --git a/sci-libs/scipy/Manifest b/sci-libs/scipy/Manifest new file mode 100644 index 000000000000..0fd321616b6b --- /dev/null +++ b/sci-libs/scipy/Manifest @@ -0,0 +1,19 @@ +AUX scipy-0.12.0-blitz.patch 731 SHA256 4f487a746aa62a39cdab9381dd4191cef0ccb912ed2e22065a7de02b85c8a269 SHA512 a788d08d34e13b02a0ec8127fd7918786cd26376ef5160f4acde585c6c1ac018a39652d9174b5e31173aa5c4e0c2f63101549de70806ea7ac56731abe3cb929c WHIRLPOOL ec00c2778e5e31a5d0ec4bc8099b4579e4eaa34a335653155da3c47e3c69fb3a8ff67b816cbeb769b81826c27ca687fc9fc22db11b91ddfadb6268c98890b302 +AUX scipy-0.12.0-restore-sys-argv.patch 483 SHA256 c00daf7d49c042972d2c59bf645c21f3bc437459a745da758e2548a973000170 SHA512 7c439aa7e1e0ccc7444c2c091ef03d3d39f2999a33ef487224c78e74cd3a1b84bd18a9e92d84ab2cd3fc7578644beb3b667fdaacb20a239600cb9b1765eeb7fc WHIRLPOOL f0d4a84e40ee26399b121f0d9159914d480789c83f749cf060bc65f63df315f27718359df7c13c64ae7a04eea00470ea109b110310abeba79944a90b97ebb102 +AUX scipy-0.16.1-glibc-2.22-backport.patch 1125 SHA256 386d8e61811e440a5a5a78219baedc7ff9016f388027cd6c836eb0084cd6b3fa SHA512 50340cbea8ee6a41a1ed60650b56a3d11f450cf182ce86f3d007a4b08069b4b9a4dab7a45cd44a530b0475e6a1fadaad001c9ea32224c16540970a51ac62046a WHIRLPOOL 58d741ccd39b1df1f2e812b130c29911d8dba15d89176009344f0b2f5897e94033d7890d3b13e328d22213a645772eaec35a00d68f0343f25cb63db52e3b3ee2 +DIST scipy-0.16.1-html.zip 33158474 SHA256 4183a170f10537f343b0bb6d77abb3c8a6abc3ebfb7e36d90713d852f1e3e5c5 SHA512 47b1ebd43b58ada7f4fd772e2a94c25d8ee2b03d808743ac386c7fbcc8a1daa3082906156ba421b1dd91ce2fb4f0114639ea124caac7522d919507029fee6c1a WHIRLPOOL 5289e9ebf32be6ea9c75c022913bcf303743efc3ad010a394c186ea9ecf1f0155ce658b6595d264531c46d27b4e7a9d760ab906698cd18e5fae9c123f08494d2 +DIST scipy-0.16.1-ref.pdf 33916573 SHA256 4fb994f7706142bb519183bbeca665422b68bd7835e074847c81b75e1c3cd755 SHA512 eaf7221c2dcb2cf0bcddcaf6064e52f3d1542edaf0238fa96ae62e27911b275a3bc7ee624fe655b0abd00055312f18582d49cafdccf339f7c38aa93ca5badea9 WHIRLPOOL b8703c52e42fdd34b54496a755327fca8a6fe03fbc500497e961a13bbb84dee58b29b7158ba44c5bc317c85103bcf4778381640fb8f1f8e719b1d886fa74fb9e +DIST scipy-0.16.1.tar.gz 12221561 SHA256 ecd1efbb1c038accb0516151d1e6679809c6010288765eb5da6051550bf52260 SHA512 1761a943a0629179fd546fe3754b16101ca86b98eb0539b73614ea65bce24055ca898f295683eb3f3f63402ebbbb9248aa2a9f6a1d7d6cdf5e1e7486b15c1a8b WHIRLPOOL 3a3924a41cfb407b0fd91e7dfa2d29a8f6ee7694681fdfe58aefab0e1272e6c1e20c814344abc4ab7cbbbb7a8de7f5867819cee73ca624d8cbdcb5db456a8025 +DIST scipy-0.18.1-html.zip 32907714 SHA256 b6118abf9af19318b566521c1944d93f0dec57a7e533641348e5338f790e1279 SHA512 fc61ce9a9dcc7091da29d35a42cc38074b0c4f5ff81d5ca5dea9c2d32e5e3ee1e8463fcb4e18c931c0c0e4f00410f8cd16d0f81c219fb326edc20d2286866e03 WHIRLPOOL 52fb21455beae1b75bb1aa24eed7d2227b52fe44bf81345fd56c12316d7c6887eccc10b551f64464da7fc034e453b06095c80c95f7baeae2374e6f256035cc18 +DIST scipy-0.18.1-ref.pdf 14824115 SHA256 c5bb8baac66c43450cab24d3fec3a4f626d51568ab311f712446b5946fe7a295 SHA512 e668420ae3668f459d15cb88765045c89df02f9c73854c8ddce8fe1611973e8c9d40ac49a1db0342282074b1d46b8156bb75430b7df079efd1c3a6ccb4bf2c37 WHIRLPOOL bf36c77059dff97402430df0721bbfe59c6e889d9c202e4a86e7f5b2cd2eb9f32115abcfaf47ceb847579bfe870707a6926d69c2c714d0655e60a9a3f7ee4103 +DIST scipy-0.18.1.tar.gz 13141689 SHA256 8ab6e9c808bf2fb3e8576cd8cf07226d9cdc18b012c06d9708429a821ac6634e SHA512 f2ee21c808141d8002f69e48e7cf006e36982b1a7041323a8f4d803a1de3d191ffcc40227aac351dd876c28843de366ef89e9cf84dc106fadac86a3f40491659 WHIRLPOOL 977729517cfaed931123484160b9f4e7949dd46c4124757c5cbfe8607f2da9ddc3ad260ac4fcd8b382b8a801a86340405eceb3ad5a48d1a3f23dd0faa0941b7e +DIST scipy-0.19.1-html.zip 38201310 SHA256 e123b40d3d550ed55df0f8fbe808ff28f6e4343c3773c553afff508819e800ba SHA512 7eecef83a92aa99a726a8839e2cdac1171129ba0efcaf8e36b07d6714fde20cce9ce9f676be6b4835845930c49f740cb11ce0d93012d0b8c990e7061bb3afbcc WHIRLPOOL 238e77c60b6356bc08f01687e6dc6ff6f07b1fddc6d30c9af78cb7a37957c5ee155708f2ee8a0644ef6aed5a787082fcf17ff35c7d95d2d8afa87100cedbdbb3 +DIST scipy-0.19.1-ref.pdf 17530855 SHA256 ebe464947f63e4b1160cb53356cfd1ce02311f5ff022f6cfc278abb5c540441f SHA512 79718fde0aedb4c9906b37f2d75878719b614268160e645ad69ea797d6baeecaff9153884171906e6b7673b65da997ff4fd245e0f42ab766497ee9c96f4f9fd2 WHIRLPOOL 7be151e33a06ee7bd110ab217a5afdee9591d8940d752eb672b0e7a22eea5497d5a8e84e7784dc335f1a926aef7ecca9d5e5f6bd5862a0674ba640ea05614daf +DIST scipy-0.19.1.tar.gz 14083805 SHA256 a19a2ca7a7336495ec180adeaa0dfdcf41e96dbbee90d51c3ed828ba570884e6 SHA512 5c124c44c672dcb53c31f8592fd9f74189f04cb0bade99476a2a6eb4844338e3e9842f27a148b007b7eed25cbfde090a697575a381ebe4ca066abdf54c214203 WHIRLPOOL 9d12befdb6504a05fd6c7917fc340726e2a498d8cd5c38d4e0abce8e6d16685c1857ff12f111daa4f4ad955e633746520ef706ff8b674c327685e2dd7790107b +EBUILD scipy-0.16.1.ebuild 4249 SHA256 753ca7a83629d7efa341cd30d12b1f8c90addfb9d5f173165f59d116cd5d76cd SHA512 adc049f57eb2c16565d8d99983409a6f64f57938aa649d89008587374550af06aa5d1f9476f61d9fcfbaa5615e60732381c1ed436b0dd9241aee00b43370ba44 WHIRLPOOL 51c956a8afc5bcee6f34139ea836f30d140bed473ad983bc86e4027c5f938fabe3248da6eb08128ab0a818bb24ded3cfb689f85756fdd19751400914e5a91980 +EBUILD scipy-0.18.1.ebuild 4254 SHA256 125458b00b5c82bace6e99561d757395ccfda1fac78c4d385cad3bcd32fbbbc8 SHA512 f20fd715cbb7667cabf636db6cf11b8b1de26c497ef87a6d4ee16324415867a9fe06f0bca57677eacb4622b621e60badcd97e8325dc74076492cb0e29ef8e4f2 WHIRLPOOL 972e665d593cc0f57f52a4e7f1f0a902a424d7e5fbc34a22e5fab80aadce52824ecc71e010d2198fda55c7821f86cbb999e09ccea69e6b6a4324588b9c114674 +EBUILD scipy-0.19.1.ebuild 4196 SHA256 735cdbd2f1b8751e030c3c206c94f27737f62db282bbd6ee8733da29dd0a109d SHA512 e894f6860336c9bd78d0a01fddc7d29fe515172a87a39dd9c1dedec689f637aec8f0e387ef872d8036c2a4f2eb04bca647d34bd023a53b65ca1e60c58643366a WHIRLPOOL 5279425b52c65b660715d10f6eecd40ce564dc02f7d49903365d4bcc5989b009d4a397427ef79e9e40e5237d99fe566f46b14bf78044bee0cbcdd49abebd3d05 +EBUILD scipy-9999.ebuild 3615 SHA256 7ae9faf83304a52715037177b47d918ebfbbef0add0418ca320860555631e14e SHA512 55148129c46cacdca338380d7d26792dcdb5d7fa3128273de9c44e930d6bf83715574d26d8b065fec8b633f1efbda9d9446a5b6bae04bc9069d315a1ee85f385 WHIRLPOOL bc8a08dca90ad96e9d101bca451296a072f31719f41bea999e1fd54b98066b7387a5c2f0b8329c79dfe84ca4ad1a2ffe219acc422700f46d01d742be1ec678ae +MISC ChangeLog 6331 SHA256 c9e72f8b504a5dd64dd119b9f4a74a0de7c223205fd9b2cb2ce3b017baa51513 SHA512 d50eed3216df4ca235f96cfebf169bc8d9f9918f25359e6570615ab85f262749d6eb3083995ced7642bc2bff134c2ffe9f13ee821a78d22fa4794da079cdc09b WHIRLPOOL e50de81c74e0dc557c841873f7816c6ecd3c4635ba725956a0dce7cc988e52d8b61ff5e13b8de5cd0ef044f7c2f71d4234527ee3bc933a0cb28e59d5b8277d06 +MISC ChangeLog-2015 23113 SHA256 7905af4d8bc5a9bbb189f25c765ab2073c1b82ce0b2f3a2a69b15e353d9a0dc8 SHA512 0a561932192fa37a7e4ff3ca1e1e3b43292d1949553ad6cf88eade9d2165beb827ba4d2d8b04bbb3c977fd6003d2130268adb7cfe4d994c98cc47d83bd4893bb WHIRLPOOL b96d6f0a7b00f3e8c13715e0adb2f37a83b556e22c8e7ce7b1dd00ca03a46af74497261549e718f2900b5a21a6e0ac36575ba6598f44bb856e33a8eeb60fcdcf +MISC metadata.xml 931 SHA256 bd111a5d426c37742d7a94d8258afb9a85573cf30371057da4650bf574cb57c4 SHA512 ae95726c4c661a2e5708a98b347f8ea25708574bbaf8ec86f315069551d6a0d68a43279b214be8b54cd20e5aacea1a9abd40a2de43d51f292a830cab0955d625 WHIRLPOOL fd568a6934a11260b01d919e2e2b10d1e859d9aab14625e6aca65348022d9ebdc6a19038649bb537f15b5ba12a82a79d01f2f8bc8e0dd599edf6a238df023ed4 diff --git a/sci-libs/scipy/files/scipy-0.12.0-blitz.patch b/sci-libs/scipy/files/scipy-0.12.0-blitz.patch new file mode 100644 index 000000000000..2817aa39b871 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.12.0-blitz.patch @@ -0,0 +1,28 @@ +Description: Fixes scipy.weave.inline compalition with g++ 4.3 and upwards +Author: Sameer Morar <smorar@gmail.com> +Forwarded: http://projects.scipy.org/scipy/scipy/ticket/739 +Bug-Debian: http://bugs.debian.org/598520 +Bug-Ubuntu: https://launchpad.net/bugs/302649 + +--- a/scipy/weave/blitz/blitz/blitz.h ++++ b/scipy/weave/blitz/blitz/blitz.h +@@ -65,6 +65,8 @@ + + #define BZ_THROW // Needed in <blitz/numinquire.h> + ++#include <cstdlib> ++ + BZ_NAMESPACE(blitz) + + #ifdef BZ_HAVE_STD +--- a/scipy/weave/blitz/blitz/prettyprint.h ++++ b/scipy/weave/blitz/blitz/prettyprint.h +@@ -22,6 +22,8 @@ + #ifndef BZ_PRETTYPRINT_H + #define BZ_PRETTYPRINT_H + ++#include <cstdlib> ++ + BZ_NAMESPACE(blitz) + + class prettyPrintFormat { diff --git a/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch b/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch new file mode 100644 index 000000000000..3eef739f93a8 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.12.0-restore-sys-argv.patch @@ -0,0 +1,15 @@ +Description: restore sys.argv in case of exception +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=500814 + +--- a/scipy/weave/build_tools.py ++++ b/scipy/weave/build_tools.py +@@ -283,6 +283,9 @@ def build_extension(module_path,compiler + configure_python_path(build_dir) + except SyntaxError: #TypeError: + success = 0 ++ except Exception, e: ++ restore_sys_argv() ++ raise e + + # restore argv after our trick... + restore_sys_argv() diff --git a/sci-libs/scipy/files/scipy-0.16.1-glibc-2.22-backport.patch b/sci-libs/scipy/files/scipy-0.16.1-glibc-2.22-backport.patch new file mode 100644 index 000000000000..791d67f32531 --- /dev/null +++ b/sci-libs/scipy/files/scipy-0.16.1-glibc-2.22-backport.patch @@ -0,0 +1,30 @@ +From 1f5ccd5447ed2796bb8e9506cfbfdb4a82cccfc0 Mon Sep 17 00:00:00 2001 +From: Ralf Gommers <ralf.gommers@gmail.com> +Date: Sat, 24 Oct 2015 18:17:04 +0200 +Subject: [PATCH] TST: fix issue with a ctypes test for integrate on Fedora. + Closes gh-5370 + +--- + scipy/integrate/tests/test_quadpack.py | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/scipy/integrate/tests/test_quadpack.py b/scipy/integrate/tests/test_quadpack.py +index c3a417c..f384c77 100644 +--- a/scipy/integrate/tests/test_quadpack.py ++++ b/scipy/integrate/tests/test_quadpack.py +@@ -42,7 +42,14 @@ def setUp(self): + file = 'libm.dylib' + else: + file = 'libm.so' +- self.lib = ctypes.CDLL(file) ++ ++ try: ++ self.lib = ctypes.CDLL(file) ++ except OSError: ++ # This test doesn't work on some Linux platforms (Fedora for ++ # example) that put an ld script in libm.so - see gh-5370 ++ self.skipTest("Ctypes can't import libm.so") ++ + restype = ctypes.c_double + argtypes = (ctypes.c_double,) + for name in ['sin', 'cos', 'tan']: diff --git a/sci-libs/scipy/metadata.xml b/sci-libs/scipy/metadata.xml new file mode 100644 index 000000000000..a4d8cf789821 --- /dev/null +++ b/sci-libs/scipy/metadata.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>sci@gentoo.org</email> + <name>Gentoo Science Project</name> + </maintainer> + <longdescription lang="en"> + SciPy is an open source library of scientific tools for Python. SciPy + supplements the popular numpy module, gathering a variety of high level + science and engineering modules together as a single package. + SciPy includes modules for graphics and plotting, optimization, + integration, special functions, signal and image processing, genetic + algorithms, ODE solvers, and others. +</longdescription> + <use> + <flag name="sparse">Adds support for sparse solving with <pkg>sci-libs/umfpack</pkg></flag> + </use> + <upstream> + <remote-id type="pypi">scipy</remote-id> + <remote-id type="sourceforge">scipy</remote-id> + </upstream> +</pkgmetadata> diff --git a/sci-libs/scipy/scipy-0.16.1.ebuild b/sci-libs/scipy/scipy-0.16.1.ebuild new file mode 100644 index 000000000000..dd5908fb2319 --- /dev/null +++ b/sci-libs/scipy/scipy-0.16.1.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +DOC_PV=${PV} + +inherit eutils fortran-2 distutils-r1 flag-o-matic multilib toolchain-funcs + +DESCRIPTION="Scientific algorithms library for Python" +HOMEPAGE="https://www.scipy.org/" +SRC_URI=" + mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz + doc? ( + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${PV}.zip -> ${PN}-${DOC_PV}-html.zip + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${PV}.pdf -> ${PN}-${DOC_PV}-ref.pdf + )" + +LICENSE="BSD LGPL-2" +SLOT="0" +IUSE="doc sparse test" +KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +CDEPEND=" + >=dev-python/numpy-1.6.2[lapack,${PYTHON_USEDEP}] + sci-libs/arpack:0= + virtual/cblas + virtual/lapack + sparse? ( sci-libs/umfpack:0= )" +DEPEND="${CDEPEND} + dev-lang/swig + >=dev-python/cython-0.22[${PYTHON_USEDEP}] + virtual/pkgconfig + doc? ( app-arch/unzip ) + test? ( dev-python/nose[${PYTHON_USEDEP}] ) + " + +RDEPEND="${CDEPEND} + dev-python/pillow[${PYTHON_USEDEP}]" + +DOCS=( HACKING.rst.txt THANKS.txt ) + +DISTUTILS_IN_SOURCE_BUILD=1 + +src_unpack() { + unpack ${P}.tar.gz + if use doc; then + unzip -qo "${DISTDIR}"/${PN}-${DOC_PV}-html.zip -d html || die + fi +} + +pc_incdir() { + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||' +} + +pc_libdir() { + $(tc-getPKG_CONFIG) --libs-only-L $@ | \ + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||' +} + +pc_libs() { + $(tc-getPKG_CONFIG) --libs-only-l $@ | \ + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' +} + +python_prepare_all() { + # scipy automatically detects libraries by default + export {FFTW,FFTW3,UMFPACK}=None + use sparse && unset UMFPACK + # the missing symbols are in -lpythonX.Y, but since the version can + # differ, we just introduce the same scaryness as on Linux/ELF + [[ ${CHOST} == *-darwin* ]] \ + && append-ldflags -bundle "-undefined dynamic_lookup" \ + || append-ldflags -shared + [[ -z ${FC} ]] && export FC="$(tc-getFC)" + # hack to force F77 to be FC until bug #278772 is fixed + [[ -z ${F77} ]] && export F77="$(tc-getFC)" + export F90="${FC}" + export SCIPY_FCONFIG="config_fc --noopt --noarch" + append-fflags -fPIC + + local libdir="${EPREFIX}"/usr/$(get_libdir) + cat >> site.cfg <<-EOF + [blas] + include_dirs = $(pc_incdir cblas) + library_dirs = $(pc_libdir cblas blas):${libdir} + blas_libs = $(pc_libs cblas blas) + [lapack] + library_dirs = $(pc_libdir lapack):${libdir} + lapack_libs = $(pc_libs lapack) + EOF + + # Drop hashes to force rebuild of cython based .c code + rm cythonize.dat || die + + local PATCHES=( + "${FILESDIR}"/${PN}-0.12.0-blitz.patch + "${FILESDIR}"/${PN}-0.12.0-restore-sys-argv.patch + "${FILESDIR}"/${P}-glibc-2.22-backport.patch + ) + distutils-r1_python_prepare_all +} + +python_compile() { + ${EPYTHON} tools/cythonize.py || die + distutils-r1_python_compile ${SCIPY_FCONFIG} +} + +python_test() { + # fails with bdist_egg. should it be fixed in distutils-r1 eclass? + distutils_install_for_testing ${SCIPY_FCONFIG} + cd "${TEST_DIR}" || die "no ${TEST_DIR} available" + "${PYTHON}" -c \ + 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \ + || die + # https://github.com/scipy/scipy/issues/5426 + "${EPYTHON}" -c \ + "import scipy, sys; r = scipy.test('fast', verbose=2, raise_warnings='release'); sys.exit(0 if r.wasSuccessful() else 1)" \ + || die "Tests fail with ${EPYTHON}" +# "${EPYTHON}" -c \ +# "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \ +# || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + if use doc; then + dodoc "${DISTDIR}"/${PN}-${DOC_PV}-ref.pdf + docinto html + dodoc -r "${WORKDIR}"/html/. + fi + distutils-r1_python_install_all +} + +python_install() { + distutils-r1_python_install ${SCIPY_FCONFIG} +} + +pkg_postinst() { + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" + elog "to your prefered image viewer. Example:" + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" +} diff --git a/sci-libs/scipy/scipy-0.18.1.ebuild b/sci-libs/scipy/scipy-0.18.1.ebuild new file mode 100644 index 000000000000..c1d9ea57af22 --- /dev/null +++ b/sci-libs/scipy/scipy-0.18.1.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +DOC_PV=${PV} + +inherit fortran-2 distutils-r1 flag-o-matic multiprocessing toolchain-funcs + +DESCRIPTION="Scientific algorithms library for Python" +HOMEPAGE="https://www.scipy.org/" +SRC_URI=" + mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz + doc? ( + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${PV}.zip -> ${PN}-${DOC_PV}-html.zip + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${PV}.pdf -> ${PN}-${DOC_PV}-ref.pdf + )" + +LICENSE="BSD LGPL-2" +SLOT="0" +IUSE="doc sparse test" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +CDEPEND=" + >=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}] + sci-libs/arpack:0= + virtual/cblas + virtual/lapack + sparse? ( sci-libs/umfpack:0= )" +DEPEND="${CDEPEND} + dev-lang/swig + >=dev-python/cython-0.22[${PYTHON_USEDEP}] + virtual/pkgconfig + doc? ( app-arch/unzip ) + test? ( dev-python/nose[${PYTHON_USEDEP}] )" +RDEPEND="${CDEPEND} + dev-python/pillow[${PYTHON_USEDEP}]" + +DOCS=( HACKING.rst.txt THANKS.txt ) + +DISTUTILS_IN_SOURCE_BUILD=1 + +PATCHES=( + "${FILESDIR}"/${PN}-0.12.0-blitz.patch + "${FILESDIR}"/${PN}-0.12.0-restore-sys-argv.patch +) + +src_unpack() { + default + if use doc; then + unzip -qo "${DISTDIR}"/${PN}-${DOC_PV}-html.zip -d html || die + fi +} + +pc_incdir() { + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||' +} + +pc_libdir() { + $(tc-getPKG_CONFIG) --libs-only-L $@ | \ + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||' +} + +pc_libs() { + $(tc-getPKG_CONFIG) --libs-only-l $@ | \ + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' +} + +python_prepare_all() { + # scipy automatically detects libraries by default + export {FFTW,FFTW3,UMFPACK}=None + use sparse && unset UMFPACK + # the missing symbols are in -lpythonX.Y, but since the version can + # differ, we just introduce the same scaryness as on Linux/ELF + [[ ${CHOST} == *-darwin* ]] \ + && append-ldflags -bundle "-undefined dynamic_lookup" \ + || append-ldflags -shared + [[ -z ${FC} ]] && export FC="$(tc-getFC)" + # hack to force F77 to be FC until bug #278772 is fixed + [[ -z ${F77} ]] && export F77="$(tc-getFC)" + export F90="${FC}" + export SCIPY_FCONFIG="config_fc --noopt --noarch" + append-fflags -fPIC + + local libdir="${EPREFIX}"/usr/$(get_libdir) + cat >> site.cfg <<-EOF || die + [blas] + include_dirs = $(pc_incdir cblas) + library_dirs = $(pc_libdir cblas blas):${libdir} + blas_libs = $(pc_libs cblas blas) + [lapack] + library_dirs = $(pc_libdir lapack):${libdir} + lapack_libs = $(pc_libs lapack) + EOF + + # Drop hashes to force rebuild of cython based .c code + rm cythonize.dat || die + + distutils-r1_python_prepare_all +} + +python_compile() { + ${EPYTHON} tools/cythonize.py || die + distutils-r1_python_compile \ + $(usex python_targets_python3_5 "" "-j $(makeopts_jobs)") \ + ${SCIPY_FCONFIG} +} + +python_test() { + # fails with bdist_egg. should it be fixed in distutils-r1 eclass? + distutils_install_for_testing ${SCIPY_FCONFIG} + cd "${TEST_DIR}" || die "no ${TEST_DIR} available" + "${PYTHON}" -c \ + 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \ + || die + # https://github.com/scipy/scipy/issues/5426 + "${EPYTHON}" -c \ + "import scipy, sys; r = scipy.test('fast', verbose=2, raise_warnings='release'); sys.exit(0 if r.wasSuccessful() else 1)" \ + || die "Tests fail with ${EPYTHON}" +# "${EPYTHON}" -c \ +# "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \ +# || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + use doc && \ + local DOCS=( "${DISTDIR}"/${PN}-${DOC_PV}-ref.pdf ) \ + local HTML_DOCS=( "${WORKDIR}"/html/. ) + distutils-r1_python_install_all +} + +python_install() { + distutils-r1_python_install ${SCIPY_FCONFIG} +} + +pkg_postinst() { + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" + elog "to your prefered image viewer. Example:" + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" +} diff --git a/sci-libs/scipy/scipy-0.19.1.ebuild b/sci-libs/scipy/scipy-0.19.1.ebuild new file mode 100644 index 000000000000..864285aeeb4f --- /dev/null +++ b/sci-libs/scipy/scipy-0.19.1.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +DOC_PV=${PV} + +inherit fortran-2 distutils-r1 flag-o-matic multiprocessing toolchain-funcs + +DESCRIPTION="Scientific algorithms library for Python" +HOMEPAGE="https://www.scipy.org/" +SRC_URI=" + mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz + doc? ( + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${PV}.zip -> ${PN}-${DOC_PV}-html.zip + https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${PV}.pdf -> ${PN}-${DOC_PV}-ref.pdf + )" + +LICENSE="BSD LGPL-2" +SLOT="0" +IUSE="doc sparse test" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" + +CDEPEND=" + >=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}] + sci-libs/arpack:0= + virtual/cblas + virtual/lapack + sparse? ( sci-libs/umfpack:0= )" +DEPEND="${CDEPEND} + dev-lang/swig + >=dev-python/cython-0.22[${PYTHON_USEDEP}] + >=dev-python/setuptools-36[${PYTHON_USEDEP}] + virtual/pkgconfig + doc? ( app-arch/unzip ) + test? ( dev-python/nose[${PYTHON_USEDEP}] )" +RDEPEND="${CDEPEND} + dev-python/pillow[${PYTHON_USEDEP}]" + +DOCS=( HACKING.rst.txt THANKS.txt ) + +DISTUTILS_IN_SOURCE_BUILD=1 + +src_unpack() { + default + if use doc; then + unzip -qo "${DISTDIR}"/${PN}-${DOC_PV}-html.zip -d html || die + fi +} + +pc_incdir() { + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||' +} + +pc_libdir() { + $(tc-getPKG_CONFIG) --libs-only-L $@ | \ + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||' +} + +pc_libs() { + $(tc-getPKG_CONFIG) --libs-only-l $@ | \ + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' +} + +python_prepare_all() { + # scipy automatically detects libraries by default + export {FFTW,FFTW3,UMFPACK}=None + use sparse && unset UMFPACK + # the missing symbols are in -lpythonX.Y, but since the version can + # differ, we just introduce the same scaryness as on Linux/ELF + [[ ${CHOST} == *-darwin* ]] \ + && append-ldflags -bundle "-undefined dynamic_lookup" \ + || append-ldflags -shared + [[ -z ${FC} ]] && export FC="$(tc-getFC)" + # hack to force F77 to be FC until bug #278772 is fixed + [[ -z ${F77} ]] && export F77="$(tc-getFC)" + export F90="${FC}" + export SCIPY_FCONFIG="config_fc --noopt --noarch" + append-fflags -fPIC + + local libdir="${EPREFIX}"/usr/$(get_libdir) + cat >> site.cfg <<-EOF || die + [blas] + include_dirs = $(pc_incdir cblas) + library_dirs = $(pc_libdir cblas blas):${libdir} + blas_libs = $(pc_libs cblas blas) + [lapack] + library_dirs = $(pc_libdir lapack):${libdir} + lapack_libs = $(pc_libs lapack) + EOF + + # Drop hashes to force rebuild of cython based .c code + rm cythonize.dat || die + + distutils-r1_python_prepare_all +} + +python_compile() { + ${EPYTHON} tools/cythonize.py || die + distutils-r1_python_compile \ + $(usex python_targets_python3_5 "" "-j $(makeopts_jobs)") \ + ${SCIPY_FCONFIG} +} + +python_test() { + # fails with bdist_egg. should it be fixed in distutils-r1 eclass? + distutils_install_for_testing ${SCIPY_FCONFIG} + cd "${TEST_DIR}" || die "no ${TEST_DIR} available" + "${PYTHON}" -c \ + 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \ + || die + # https://github.com/scipy/scipy/issues/5426 + "${EPYTHON}" -c \ + "import scipy, sys; r = scipy.test('fast', verbose=2, raise_warnings='release'); sys.exit(0 if r.wasSuccessful() else 1)" \ + || die "Tests fail with ${EPYTHON}" +# "${EPYTHON}" -c \ +# "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \ +# || die "Tests fail with ${EPYTHON}" +} + +python_install_all() { + use doc && \ + local DOCS=( "${DISTDIR}"/${PN}-${DOC_PV}-ref.pdf ) \ + local HTML_DOCS=( "${WORKDIR}"/html/. ) + distutils-r1_python_install_all +} + +python_install() { + distutils-r1_python_install ${SCIPY_FCONFIG} +} + +pkg_postinst() { + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" + elog "to your prefered image viewer. Example:" + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" +} diff --git a/sci-libs/scipy/scipy-9999.ebuild b/sci-libs/scipy/scipy-9999.ebuild new file mode 100644 index 000000000000..b25250bfad33 --- /dev/null +++ b/sci-libs/scipy/scipy-9999.ebuild @@ -0,0 +1,125 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_{4,5,6} ) +PYTHON_REQ_USE="threads(+)" + +DOC_PV=${PV} + +inherit fortran-2 distutils-r1 flag-o-matic git-r3 multiprocessing toolchain-funcs + +DESCRIPTION="Scientific algorithms library for Python" +HOMEPAGE="https://www.scipy.org/" +EGIT_REPO_URI="https://github.com/scipy/scipy.git" + +LICENSE="BSD LGPL-2" +SLOT="0" +KEYWORDS="" +IUSE="sparse test" + +CDEPEND=" + >=dev-python/numpy-1.10[lapack,${PYTHON_USEDEP}] + sci-libs/arpack:0= + virtual/cblas + virtual/lapack + sparse? ( sci-libs/umfpack:0= )" +DEPEND="${CDEPEND} + dev-lang/swig + >=dev-python/cython-0.23.4[${PYTHON_USEDEP}] + virtual/pkgconfig + test? ( dev-python/nose[${PYTHON_USEDEP}] ) + " + +RDEPEND="${CDEPEND} + dev-python/pillow[${PYTHON_USEDEP}]" + +DOCS=( HACKING.rst.txt THANKS.txt ) + +DISTUTILS_IN_SOURCE_BUILD=1 + +pc_incdir() { + $(tc-getPKG_CONFIG) --cflags-only-I $@ | \ + sed -e 's/^-I//' -e 's/[ ]*-I/:/g' -e 's/[ ]*$//' -e 's|^:||' +} + +pc_libdir() { + $(tc-getPKG_CONFIG) --libs-only-L $@ | \ + sed -e 's/^-L//' -e 's/[ ]*-L/:/g' -e 's/[ ]*$//' -e 's|^:||' +} + +pc_libs() { + $(tc-getPKG_CONFIG) --libs-only-l $@ | \ + sed -e 's/[ ]-l*\(pthread\|m\)\([ ]\|$\)//g' \ + -e 's/^-l//' -e 's/[ ]*-l/,/g' -e 's/[ ]*$//' \ + | tr ',' '\n' | sort -u | tr '\n' ',' | sed -e 's|,$||' +} + +python_prepare_all() { + # scipy automatically detects libraries by default + export {FFTW,FFTW3,UMFPACK}=None + use sparse && unset UMFPACK + # the missing symbols are in -lpythonX.Y, but since the version can + # differ, we just introduce the same scaryness as on Linux/ELF + [[ ${CHOST} == *-darwin* ]] \ + && append-ldflags -bundle "-undefined dynamic_lookup" \ + || append-ldflags -shared + [[ -z ${FC} ]] && export FC="$(tc-getFC)" + # hack to force F77 to be FC until bug #278772 is fixed + [[ -z ${F77} ]] && export F77="$(tc-getFC)" + export F90="${FC}" + export SCIPY_FCONFIG="config_fc --noopt --noarch" + append-fflags -fPIC + + local libdir="${EPREFIX}"/usr/$(get_libdir) + cat >> site.cfg <<-EOF || die + [blas] + include_dirs = $(pc_incdir cblas) + library_dirs = $(pc_libdir cblas blas):${libdir} + blas_libs = $(pc_libs cblas blas) + [lapack] + library_dirs = $(pc_libdir lapack):${libdir} + lapack_libs = $(pc_libs lapack) + EOF + + # Drop hashes to force rebuild of cython based .c code + rm cythonize.dat || die + + distutils-r1_python_prepare_all +} + +python_compile() { + ${EPYTHON} tools/cythonize.py || die + distutils-r1_python_compile \ + $(usex python_targets_python3_5 "" "-j $(makeopts_jobs)") \ + ${SCIPY_FCONFIG} +} + +python_test() { + # fails with bdist_egg. should it be fixed in distutils-r1 eclass? + distutils_install_for_testing ${SCIPY_FCONFIG} + cd "${TEST_DIR}" || die "no ${TEST_DIR} available" + einfo "Run test I" + "${PYTHON}" -c \ + 'import numpy as np; print("relaxed strides checking:", np.ones((10,1),order="C").flags.f_contiguous)' \ + || die + einfo "Run test II" + # https://github.com/scipy/scipy/issues/5426 + "${EPYTHON}" -c \ + "import scipy, sys; r = scipy.test('fast', verbose=2, raise_warnings='release'); sys.exit(0 if r.wasSuccessful() else 1)" \ + || die "Tests fail with ${EPYTHON}" +# "${EPYTHON}" -c \ +# "import scipy, sys; r = scipy.test('fast',verbose=2); sys.exit(0 if r.wasSuccessful() else 1)" \ +# || die "Tests fail with ${EPYTHON}" +} + +python_install() { + distutils-r1_python_install ${SCIPY_FCONFIG} +} + +pkg_postinst() { + elog "You might want to set the variable SCIPY_PIL_IMAGE_VIEWER" + elog "to your prefered image viewer. Example:" + elog "\t echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc" +} |