aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-numpy/APKBUILD
blob: e0dd256afc444599f2292c031c44aeb871b91f73 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# 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
pkgver=1.19.1
pkgrel=0
pkgdesc="Scientific tools for Python"
url="https://www.numpy.org/"
arch="all !mips !mips64"
license="BSD-3-Clause"
options="!check"
replaces="py-numpy"
makedepends="python3-dev cython openblas-dev>=0.3.0
	gfortran py3-nose libbsd-dev py3-setuptools
	lapack-dev"
subpackages="$pkgname-dev
	$pkgname-doc
	$pkgname-f2py::noarch"
source="https://github.com/numpy/numpy/releases/download/v$pkgver/numpy-$pkgver.tar.gz
	numpy-1.17.0-musl.patch
	site.cfg"
builddir="$srcdir/numpy-$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/
}

dev() {
	depends_dev="$pkgname"
	default_dev
}

sha512sums="8194e3bc672c79e0744f8807c6c952d0b02f9c10ae0e0a85ccbf3e135adb801da657820496b28f8d6fa0109518533defc698d33902a2feba0e4ddc25a53aaa9c  numpy-1.19.1.tar.gz
2272f400594c1b2a3b69385fe0aa13d54cd12f4c4f1b109fa07789db7eec4bb681a68fd3d95ce9fb1342a5f76394e2381bb5fa8542631fc50b9a9335c512c690  numpy-1.17.0-musl.patch
21ca8db304cbbf5949f07702f2a42bb5e5a0d641921e36649555a41b0e48f04e96f53760417823177ac27f6de24b2191e6e1d5f0eb393beafa29f7484e23284f  site.cfg"