diff options
Diffstat (limited to 'community/py3-scipy/APKBUILD')
-rw-r--r-- | community/py3-scipy/APKBUILD | 70 |
1 files changed, 55 insertions, 15 deletions
diff --git a/community/py3-scipy/APKBUILD b/community/py3-scipy/APKBUILD index 970abdfd140..bb5e4e53245 100644 --- a/community/py3-scipy/APKBUILD +++ b/community/py3-scipy/APKBUILD @@ -1,31 +1,71 @@ # Contributor: Martell Malone <martellmalone@gmail.com> -# Maintainer: +# Contributor: fossdd <fossdd@pwned.life> +# Maintainer: fossdd <fossdd@pwned.life> pkgname=py3-scipy -pkgver=1.6.2 -pkgrel=1 +pkgver=1.11.4 +pkgrel=2 pkgdesc="Python library for scientific computing" -url="https://www.scipy.org" -arch="all !mips !mips64" +url="https://www.scipy.org/" +arch="all" license="BSD-3-Clause" -depends="py3-numpy-f2py" -makedepends="cython gfortran openblas-dev>=0.3.0 py3-numpy-dev py3-setuptools - python3-dev lapack-dev py3-pybind11-dev" -source="https://github.com/scipy/scipy/releases/download/v$pkgver/scipy-$pkgver.tar.xz - missing-int64_t.patch +depends="py3-pooch py3-numpy" +makedepends=" + cython + gfortran + openblas-dev + py3-gpep517 + py3-meson-python + py3-numpy-dev + py3-numpy-f2py + py3-pybind11-dev + py3-setuptools + py3-wheel + python3-dev + pythran " +checkdepends="py3-hypothesis py3-pytest" +subpackages="$pkgname-tests $pkgname-pyc" +source="https://pypi.io/packages/source/s/scipy/scipy-$pkgver.tar.gz" builddir="$srcdir"/scipy-$pkgver replaces=py-scipy # Backwards compatibility provides=py-scipy=$pkgver-r$pkgrel # Backwards compatibility build() { - export LDFLAGS="$LDFLAGS -shared" - python3 setup.py config_fc --fcompiler=gnu95 build + case "$CARCH" in + ppc64le) + # Segmentation fault (core dumped) + sed -i '/test_propack.py/d' scipy/sparse/linalg/tests/meson.build + rm scipy/sparse/linalg/tests/test_propack.py + ;; + esac + + export CFLAGS="$CFLAGS -O3" + export CXXFLAGS="$CXXFLAGS -O3" + + gpep517 build-wheel \ + --wheel-dir .dist \ + --output-fd 3 3>&1 >&2 +} + +check() { + python3 -m venv --clear --without-pip --system-site-packages .testenv + .testenv/bin/python3 -m installer .dist/*.whl + cd .testenv + bin/python -c "from scipy import test; test('full')" } package() { - python3 setup.py install --prefix=/usr --root="$pkgdir" + python3 -m installer -d "$pkgdir" \ + .dist/*.whl +} + +tests() { + find "$pkgdir" -name tests -type d | while read -r p; do + amove "${p#"$pkgdir"}" + done } -sha512sums="2253f257d5c55739a47759e039602dc542bd1a068c5883fd2a80a60bc7d3e8372d467d589ae2c83b9a847d0fb76c1fb841208213297db284f142fac98dd33b8e scipy-1.6.2.tar.xz -df346dc84e4ec6773e1e7fe21dccf6d124c8a498d4daba77d3abd399fef1aa711b9799541c5e7b6b3ee209c738817cc2680810dcd2c4ee61686292536e6b00d1 missing-int64_t.patch" +sha512sums=" +2eb403f6de9723b411d948b8e1b5457078704c605b8e760d42362c82d802e167eaaf701ddb8b480af2bdf2efe4dbf66fcc4e97321519bb8dab19b0e2a8976beb scipy-1.11.4.tar.gz +" |