commit:     ec7abffe5f08b26e8e6bf9361a14b1ae80a8c675
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  2 22:46:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 12 08:42:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec7abffe

dev-python/scipy: add 1.9.9999 for Meson testing

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../scipy-1.9.9999-meson-options-lapack.patch      | 28 +++++++++
 dev-python/scipy/scipy-1.9.9999.ebuild             | 73 ++++++++++++++++++++++
 2 files changed, 101 insertions(+)

diff --git a/dev-python/scipy/files/scipy-1.9.9999-meson-options-lapack.patch 
b/dev-python/scipy/files/scipy-1.9.9999-meson-options-lapack.patch
new file mode 100644
index 000000000000..23d29c31c2cb
--- /dev/null
+++ b/dev-python/scipy/files/scipy-1.9.9999-meson-options-lapack.patch
@@ -0,0 +1,28 @@
+diff --git a/meson_options.txt b/meson_options.txt
+index 5935bb8..f8c14ce 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,6 +1,6 @@
+-option('blas', type: 'string', value: 'openblas',
++option('blas', type: 'string', value: 'blas',
+         description: 'option for BLAS library switching')
+-option('lapack', type: 'string', value: 'openblas',
++option('lapack', type: 'string', value: 'lapack',
+         description: 'option for LAPACK library switching')
+ option('use-g77-abi', type: 'boolean', value: 'false',
+         description: 'If set to true, forces using g77 compatibility wrappers 
' +
+diff --git a/meson.build b/meson.build
+index d80ebc93e..c0c92c00f 100644
+--- a/meson.build
++++ b/meson.build
+@@ -16,8 +16,8 @@ project(
+     'c_args=-Wno-unused-function -Wno-conversion -Wno-misleading-indentation 
-Wno-incompatible-pointer-types',
+     'fortran_args=-Wno-conversion',
+     'fortran_std=legacy',
+-    'blas=openblas',
+-    'lapack=openblas'
++    'blas=blas',
++    'lapack=lapack'
+   ],
+ )
+ 

diff --git a/dev-python/scipy/scipy-1.9.9999.ebuild 
b/dev-python/scipy/scipy-1.9.9999.ebuild
new file mode 100644
index 000000000000..a25a63827ff7
--- /dev/null
+++ b/dev-python/scipy/scipy-1.9.9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=meson-python
+PYTHON_COMPAT=( python3_{8..10} )
+PYTHON_REQ_USE="threads(+)"
+
+inherit fortran-2 distutils-r1 multiprocessing
+
+DESCRIPTION="Scientific algorithms library for Python"
+HOMEPAGE="
+       https://scipy.org/
+       https://github.com/scipy/scipy/
+       https://pypi.org/project/scipy/
+"
+
+if [[ ${PV} == *9999* ]] ; then
+       inherit git-r3
+
+       # Need submodules, so git for now.
+       EGIT_REPO_URI="https://github.com/scipy/scipy";
+       EGIT_BRANCH="maintenance/$(ver_cut 1-2).x"
+       EGIT_SUBMODULES=( '*' )
+else
+       # Upstream is often behind with doc updates
+       DOC_PV=1.8.1
+
+       SRC_URI="
+               mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
+               doc? (
+                       
https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-html-${DOC_PV}.zip
+                       
https://docs.scipy.org/doc/${PN}-${DOC_PV}/${PN}-ref-${DOC_PV}.pdf
+               )"
+
+       KEYWORDS="~amd64 ~arm ~arm64 -hppa ~ia64 ~ppc ~ppc64 ~riscv ~s390 
~sparc ~x86"
+fi
+
+LICENSE="BSD LGPL-2"
+SLOT="0"
+IUSE="doc +sparse"
+
+DEPEND="
+       >=dev-python/numpy-1.17.3[lapack,${PYTHON_USEDEP}]
+       sci-libs/arpack:0=
+       virtual/cblas
+       virtual/lapack
+       sparse? ( sci-libs/umfpack:0= )"
+RDEPEND="${DEPEND}
+       dev-python/pillow[${PYTHON_USEDEP}]"
+# TODO: restore pythran optionality?
+BDEPEND="
+       dev-lang/swig
+       >=dev-python/cython-0.29.18[${PYTHON_USEDEP}]
+       dev-python/pybind11[${PYTHON_USEDEP}]
+       dev-python/pythran[${PYTHON_USEDEP}]
+       dev-util/patchelf
+       virtual/pkgconfig
+       doc? ( app-arch/unzip )
+       test? ( dev-python/pytest-xdist[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.9.9999-meson-options-lapack.patch
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+       cd "${T}" || die
+
+       epytest -n "$(makeopts_jobs)" --pyargs scipy
+}

Reply via email to