From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1236412-garchives=archives.gentoo.org@lists.gentoo.org>
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 F08D51382C5
	for <garchives@archives.gentoo.org>; Thu, 31 Dec 2020 20:22:03 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 230C8E086D;
	Thu, 31 Dec 2020 20:22:03 +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 E1D45E086D
	for <gentoo-commits@lists.gentoo.org>; Thu, 31 Dec 2020 20:22:02 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(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 C3AF3340A7F
	for <gentoo-commits@lists.gentoo.org>; Thu, 31 Dec 2020 20:22:01 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 7CDF153
	for <gentoo-commits@lists.gentoo.org>; Thu, 31 Dec 2020 20:22:00 +0000 (UTC)
From: "Michał Górny" <mgorny@gentoo.org>
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" <mgorny@gentoo.org>
Message-ID: <1609446117.49571f608157efeba94b19bdf767c8bec9bea8f4.mgorny@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/scipy/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-python/scipy/Manifest dev-python/scipy/scipy-1.6.0.ebuild
X-VCS-Directories: dev-python/scipy/
X-VCS-Committer: mgorny
X-VCS-Committer-Name: Michał Górny
X-VCS-Revision: 49571f608157efeba94b19bdf767c8bec9bea8f4
X-VCS-Branch: master
Date: Thu, 31 Dec 2020 20:22:00 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: a9ae8771-83e1-4f88-ba81-d7391316683f
X-Archives-Hash: 5679a12082be938261efe6c283c1a4d9

commit:     49571f608157efeba94b19bdf767c8bec9bea8f4
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 31 19:01:55 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Dec 31 20:21:57 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49571f60

dev-python/scipy: Bump to 1.6.0

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/scipy/Manifest           |   3 +
 dev-python/scipy/scipy-1.6.0.ebuild | 155 ++++++++++++++++++++++++++++++++++++
 2 files changed, 158 insertions(+)

diff --git a/dev-python/scipy/Manifest b/dev-python/scipy/Manifest
index dd57f9badef..43540d9367a 100644
--- a/dev-python/scipy/Manifest
+++ b/dev-python/scipy/Manifest
@@ -13,3 +13,6 @@ DIST scipy-1.5.3.tar.gz 25234560 BLAKE2B 734f29b7e3f6591b265ec43e173d1303683e2fc
 DIST scipy-1.5.4-html.zip 23175279 BLAKE2B 79cf621daa4c41414cd6d52364481ff5df4a21232bc37a5c60f9e63b60e9ad9b07a1603865fd60b2041375ae12791d761fe5d3cbd1f5c0977a37e8bf497c1e3c SHA512 eb93b2ae1dcb916bfbe77ac0ccb7f7f66af3ad3965d397c84dfbc725af08060dccf3fb0988961bf2051f0236c64066dd28f01d85484babb3ee997a9d0bab8069
 DIST scipy-1.5.4-ref.pdf 33467477 BLAKE2B d7a110258d6fe0430c380b34e2053b6b0ef8da7a6b3bee35314d55beae887afb32d01479f1ad6b8bf6847c2225890c20c118e3fd692dae55292793f38b484a9d SHA512 7f98b5014553f73880fe18d942684b8282c6aefb90b329865b65d45cfa0cffac0a8808e970af291a96e4d326ec8b284dc4385ffa5469049b4f643be8642329e7
 DIST scipy-1.5.4.tar.gz 25237512 BLAKE2B 719cfecd6794b037dc636793ba38a3b39f5fd1a44ce2fd2cf2418b0ca6d1a7898b34c4cf684752fdde635107744773c796b998418d5a983450b70beb461e32df SHA512 d23f68911a8880f87767819750d4d175ba8f9c72fcb9b8080305ee65722c046d4485fde4f0c85cc53c46247dd99813afe675a38b3b0569a683ddc2c2e021b8fc
+DIST scipy-1.6.0-html.zip 23941941 BLAKE2B 3222e9b1e1aeebfd1ab0f8d179d25c25d6ab26a54c3d6c7f12d5cb24dd59af216685cb1db1d11980ca32c8e14595a1753b69438d8c7504f7c4fc1b386e1c944d SHA512 42cd5595e1f260bcd14d5ce159d9acd0eaefbcb1401270b90efe48b0e743681361dba5ee410e5932533bca03c19daaacb6042ef8edea9b2cccd5dae21a612072
+DIST scipy-1.6.0-ref.pdf 34332184 BLAKE2B 948a03372797915e47d5e8ce44a32dcacb3448a20e06c5233d3362f0f04f228e8f7505aa918dbbd9a50ad64adb7a17181acab6a726ab251b8e8acf245a1550d6 SHA512 fe4c316f91cffb10d14207882ceb7a1d3711b03ad74857d771d0ec244caad60f878902f7279f6688c947fd415762abbb5a7082c810dd85c73385e8f58fbc056c
+DIST scipy-1.6.0.tar.gz 27275413 BLAKE2B f65fca81a21a3077ead119123fc3bb2ed96aaacfee6f291473ef6780c291f3e9fee88d86501d4cb966f1d601fb7f0656956134f0437eb8fefb8030e762c363a5 SHA512 995ffaf56b713cdd4bdb98d8525b892e9ad84a511878b43213cb71a67f34d87c111da36cf1e0b044c75c0d5af64bfde4ad0f3e9c5e71cae2dbf053251f37064e

diff --git a/dev-python/scipy/scipy-1.6.0.ebuild b/dev-python/scipy/scipy-1.6.0.ebuild
new file mode 100644
index 00000000000..8c943a4bf01
--- /dev/null
+++ b/dev-python/scipy/scipy-1.6.0.ebuild
@@ -0,0 +1,155 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_REQ_USE="threads(+)"
+
+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/${P}/${PN}-html-${PV}.zip -> ${P}-html.zip
+		https://docs.scipy.org/doc/${P}/${PN}-ref-${PV}.pdf -> ${P}-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 )"
+
+DEPEND="
+	>=dev-python/numpy-1.16.5[lapack,${PYTHON_USEDEP}]
+	sci-libs/arpack:0=
+	virtual/cblas
+	virtual/lapack
+	sparse? ( sci-libs/umfpack:0= )"
+RDEPEND="${DEPEND}
+	dev-python/pillow[${PYTHON_USEDEP}]"
+BDEPEND="
+	dev-lang/swig
+	>=dev-python/cython-0.29.13[${PYTHON_USEDEP}]
+	dev-python/pybind11[${PYTHON_USEDEP}]
+	virtual/pkgconfig
+	doc? ( app-arch/unzip )
+	test? (
+		dev-python/nose[${PYTHON_USEDEP}]
+		dev-python/pytest[${PYTHON_USEDEP}]
+	)"
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+src_unpack() {
+	default
+	if use doc; then
+		unzip -qo "${DISTDIR}"/${P}-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}"/${P}-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 "    echo \"export SCIPY_PIL_IMAGE_VIEWER=display\" >> ~/.bashrc"
+}