From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1590A138359 for ; Fri, 24 Jul 2020 14:31:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4FD16E0883; Fri, 24 Jul 2020 14:31:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 113A9E0883 for ; Fri, 24 Jul 2020 14:31:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id DF0E234F213 for ; Fri, 24 Jul 2020 14:31:44 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 855D72F5 for ; Fri, 24 Jul 2020 14:31:39 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1595601092.511cd9618f77457ce2ced159fe8eb4fd927e22ca.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/scipy/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/scipy/Manifest sci-libs/scipy/scipy-1.5.2.ebuild X-VCS-Directories: sci-libs/scipy/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 511cd9618f77457ce2ced159fe8eb4fd927e22ca X-VCS-Branch: master Date: Fri, 24 Jul 2020 14:31:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: cb806a37-de09-4439-b628-1da57561261c X-Archives-Hash: c3357d9d90c64aec158c8500b8b3695f commit: 511cd9618f77457ce2ced159fe8eb4fd927e22ca Author: Michał Górny gentoo org> AuthorDate: Fri Jul 24 12:29:19 2020 +0000 Commit: Michał Górny gentoo org> CommitDate: Fri Jul 24 14:31:32 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=511cd961 sci-libs/scipy: Bump to 1.5.2 Signed-off-by: Michał Górny gentoo.org> sci-libs/scipy/Manifest | 3 + sci-libs/scipy/scipy-1.5.2.ebuild | 160 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+) diff --git a/sci-libs/scipy/Manifest b/sci-libs/scipy/Manifest index 44754c74cdb..9ed4593e3fc 100644 --- a/sci-libs/scipy/Manifest +++ b/sci-libs/scipy/Manifest @@ -10,3 +10,6 @@ DIST scipy-1.5.0.tar.gz 25573194 BLAKE2B f505e5f0627687aeefe0af0886b03eead9f6426 DIST scipy-1.5.1-html.zip 23582280 BLAKE2B 97b256bc7367836f35ce7e0ac47436dd72c1afe249dea1a2f437ea883e74ecb8f5bbe22e20bb804aac66b86fb35e8b4f0e329c44d9d601318ef1accc82e8e850 SHA512 eb0c7736d2bdc9f45926d19f4a22e1168d0f06e21b338cd7e7884af79c7634885350c510251d4cd1629b2a294003e93f8e71bafd8ec64c1aea4d4174c3946597 DIST scipy-1.5.1-ref.pdf 33698325 BLAKE2B 6ff0d13474acf2960352580765c86ef54faa9bb616b4b8097665fa3b8a3a6033acb524d5bb76757b23d0ea9550b556293509a91e5cbeb7b0a388ea75d1bec29b SHA512 c0fbebb5dec19aebe7783507ccebf28134227096caad915e1f28f963386a07b1246fa624e4680691809c5ba31a09d3dd6e4f27f9e86f5985f8a7eecb1eea82d3 DIST scipy-1.5.1.tar.gz 25575560 BLAKE2B e431a54f1810590b75d0f115bdbcd3c561d0d918664d91654fa4f2583d4d2807deae36b3293be0a5add650fb5d99f744e1d893d369f6053741d863e2826dcc3c SHA512 d46abaaa52e5521d8f3f6d79f58c8473a8649faa01e93d250d2ee19d5778e31c13aaa855bd8f059ddc1424ae13001f15a41f240fa6b0acf3ffd911ea30da1040 +DIST scipy-1.5.2-html.zip 23166876 BLAKE2B a90d6a2eb25c56147c0c1cccb58cddd230c20cd70dcc5c39b7307acaeac5320ff1c6ed46e3027ec40f604db503a90620cf87212e45f3158c667ec20d95bac649 SHA512 35c675821675844b163eacdaf448173edb78adb5e9f3e438a70809b8b59425a987fd3ed7d6f7863612111ece4a6a36504279ef4492166f5e24a9b2c7ea9d21e7 +DIST scipy-1.5.2-ref.pdf 33462200 BLAKE2B 5784612eb41221a02520778d72341702a7dd4ee8c0147592e170054107219b03af4ccebe1f5e2a57f90f3b892455f95ec45d8eac8e4a7155e21e9ae0526b302f SHA512 15961b7280eb903d2db7a05915b94b3c298cabf68a6694da217680e23fe621885dd169dc88a033ee001a89bc6e6b13ef787ec61009f6ffe38aeaa2dfb84f8a47 +DIST scipy-1.5.2.tar.gz 25423944 BLAKE2B 0a4987da0cde4f33bbb0e2be571b59e9064b1c6554c61c1655100abdecfde54d64845cd30c5b3fcac3ae7426572757aa9a66065dd3b48e6e4cdd4d0ea847868e SHA512 45463df30a0f6270d9f4cf52235f31607904a6ae1375e12600e7f1ab2d27b1dc25a6211b49dceb71506be22c756890adaf9f81d9e6be7455def86c9caf0dc923 diff --git a/sci-libs/scipy/scipy-1.5.2.ebuild b/sci-libs/scipy/scipy-1.5.2.ebuild new file mode 100644 index 00000000000..a3d305b0846 --- /dev/null +++ b/sci-libs/scipy/scipy-1.5.2.ebuild @@ -0,0 +1,160 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_{6..9} ) +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" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos" +IUSE="doc sparse test" +RESTRICT="!test? ( 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.29.13[${PYTHON_USEDEP}] + >=dev-python/setuptools-36[${PYTHON_USEDEP}] + dev-python/pybind11[${PYTHON_USEDEP}] + virtual/pkgconfig + doc? ( app-arch/unzip ) + test? ( + dev-python/nose[${PYTHON_USEDEP}] + dev-python/pytest[${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 + cat >> setup.cfg <<-EOF || die + [options] + zip_safe = False + EOF + + # Drop hashes to force rebuild of cython based .c code + rm cythonize.dat || die + + # TODO + sed -e 's:test_magic_square_sparse_no_presolve:_&:' \ + -i scipy/optimize/tests/test_linprog.py || die + sed -e "s:== 'levy_stable':in ('levy_stable', 'crystalball', 'ncf'):" \ + -i scipy/stats/tests/test_continuous_basic.py || die + + distutils-r1_python_prepare_all +} + +python_configure_all() { + # bug 721860 + test-flag-FC -fallow-argument-mismatch && + append-fflags -fallow-argument-mismatch +} + +python_compile() { + # FIXME: parallel python building fails, bug #614464 + export MAKEOPTS=-j1 + + ${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}/lib" || die "no ${TEST_DIR} available" + PYTHONPATH=. "${EPYTHON}" -c " +import scipy, sys +r = scipy.test('fast', verbose=2) +sys.exit(0 if r 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} + python_optimize +} + +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" +}