summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d9c42293206929bf0a2a1d416899e30f1c170af4 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#  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.62.0dev0.r518.gb8db41c87
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.45.0dev0.r497'
  '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"
}