blob: 271d6fca53e82dbe0e6dfefc04b1cad332b385bb (
plain)
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
|
# Maintainer: crl <crl18039102576@126.com>
pkgname=python-numpy-mkl-tbb
pkgver=2.2.0
pkgrel=2
pkgdesc="Scientific tools for Python, compiled with Intel MKL and TBB"
arch=(x86_64)
license=(BSD-3-Clause)
url="https://numpy.org"
provides=("python-numpy=$pkgver")
conflicts=(python-numpy python-numpy-mkl python-numpy-mkl-debug)
depends=(python intel-oneapi-mkl intel-oneapi-mkl)
makedepends=(python-build python-installer meson-python python-setuptools cython gcc-fortran procps-ng)
checkdepends=(python-pytest python-hypothesis)
optdepends=('python-threadpoolctl: for show_runtime() support')
source=("https://github.com/numpy/numpy/releases/download/v$pkgver/numpy-$pkgver.tar.gz")
sha512sums=('3a0776ac175beb82b2aea0d384b60896cd1ee1055b414765965edd621839c8292fadaaaa18482c975c8e34319578cb20db4aa8f4ad06bd41a1833563c55fc3e9')
build() {
source /opt/intel/oneapi/setvars.sh
cd numpy-$pkgver
CFLAGS+=" -ffat-lto-objects" \
CXXFLAGS+=" -ffat-lto-objects" \
python -m build --wheel --no-isolation \
-Csetup-args="-Dblas=mkl-dynamic-lp64-tbb" \
-Csetup-args="-Dlapack=mkl-dynamic-lp64-tbb"
}
check() {
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
cd numpy-$pkgver
python -m installer --destdir="$PWD/tmp_install" dist/*.whl
cd "$PWD/tmp_install"
PATH="$PWD/usr/bin:$PATH" PYTHONPATH="$PWD/$site_packages:$PYTHONPATH" python -c 'import numpy; numpy.test()'
}
package() {
cd numpy-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/python-numpy/"
}
|