summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1e3612f9b1681c470aea55cffd695b9520d63187 (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
43
44
45
46
47
48
#  Maintainer: Blair Bonnett <blair.bonnett at gmail>
# Contributor: Sebastiaan Lokhorst <sebastiaanlokhorst@gmail.com>
# Contributor: Michael Schubert <mschu.dev at gmail>

pkgname=python-numba-git
pkgver=0.61.0dev0.r184.gafb3d168e
pkgrel=1
pkgdesc='NumPy aware dynamic Python compiler using LLVM (Git version)'
url='https://github.com/numba/numba'
arch=('x86_64')
license=('BSD-2-Clause')
depends=('python-llvmlite>=0.44.0dev0' 'python-numpy' 'python-setuptools')
optdepends=(
  'openmp: OpenMP threading backend'
  'tbb: TBB threading backend'
  'python-scipy: cython bindings used in np.linalg.* support'
  'python-jinja: “pretty” type annotation output (HTML) via the CLI'
  'python-cffi: use of CFFI bindings in compiled functions'
  'python-yaml: use of a .numba_config.yaml file for storing per project configuration options'
  'python-colorama: error message highlighting'
  'python-pygments: “pretty” type annotation'
)
makedepends=('git' 'openmp' 'python-build' 'python-installer' 'python-wheel' 'tbb')
conflicts=('python-numba')
provides=("python-numba=$pkgver")
source=('git+https://github.com/numba/numba.git')
sha256sums=('SKIP')

pkgver() {
  cd numba
  printf "%s" "$(git describe --long origin/HEAD | sed 's/\([^-]*-g\)/r\1/;s/-/./g')"
}

build() {
  cd numba
  python -m build --no-isolation --wheel
}

package() {
  cd numba
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE LICENSES.third-party

  # Remove tests from final package.
  local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
  rm -r "$pkgdir/$site_packages/numba/tests"
  rm -r "$pkgdir/$site_packages/numba/cuda/tests"
}