diff options
Diffstat (limited to 'community/py3-numpy/APKBUILD')
-rw-r--r-- | community/py3-numpy/APKBUILD | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/community/py3-numpy/APKBUILD b/community/py3-numpy/APKBUILD new file mode 100644 index 0000000000..638ac5dc55 --- /dev/null +++ b/community/py3-numpy/APKBUILD @@ -0,0 +1,54 @@ +# Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Contributor: Martell Malone <martellmalone@gmail.com> +# Maintainer: Francesco Colista <fcolista@alpinelinux.org> +pkgname=py3-numpy +_pkgname=numpy +pkgver=1.17.0 +pkgrel=0 +pkgdesc="Scientific tools for Python" +url="https://www.numpy.org/" +arch="all" +license="BSD-3-Clause" +options="!check" +replaces="py-numpy" +makedepends="python3-dev cython openblas-dev>=0.3.0 + gfortran py3-nose libbsd-dev" +subpackages="$pkgname-dev + $pkgname-doc + $pkgname-f2py::noarch" +source="https://github.com/numpy/numpy/releases/download/v$pkgver/$_pkgname-$pkgver.tar.gz + numpy-1.17.0-musl.patch + site.cfg" +builddir="$srcdir/$_pkgname-$pkgver" + +prepare() { + default_prepare + cp "$srcdir"/site.cfg "$builddir"/ +} + +build() { + export Atlas=None + LDFLAGS="$LDFLAGS -shared" + python3 setup.py build config_fc --fcompiler=gnu95 +} + +package() { + python3 setup.py install --prefix=/usr --root="$pkgdir" \ + config_fc --fcompiler=gnu95 + + install -D -m 644 LICENSE.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE +} + +f2py() { + pkgdesc="f2py for numpy (for python3)" + depends="py3-numpy=$pkgver-r$pkgrel python3-dev" + install_if="$pkgname-f2py=$pkgver-r$pkgrel python3" + mkdir -p "$subpkgdir"/usr/bin + mv "$pkgdir"/usr/bin/f2py* "$subpkgdir"/usr/bin/ +} + +sha512sums="24ed1c509c483e86c10ed8ed63d3a6efb3fc46eaf1bbbd0712e231a546c6ff80750cdd11f7e4a8a59848425a050f8f7fa358fcb665d3bcf3b878aedbdfb8f7b5 numpy-1.17.0.tar.gz +f9f2a89ad4409b14e2b46acedadfc5e8d79a749af6cad3c8d168bcaf21ca4379cd03be95f22485c35b41114604599bbeb9adaa96dff4194b01dc73e90c04a29f numpy-1.17.0-musl.patch +21ca8db304cbbf5949f07702f2a42bb5e5a0d641921e36649555a41b0e48f04e96f53760417823177ac27f6de24b2191e6e1d5f0eb393beafa29f7484e23284f site.cfg" |