summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5088ccbe80efda5a1423487227a57fd4a8f3f028 (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
# PKGBUILD generated by pipman
# Python package author: JAX team <jax-dev@google.com>
# Maintainer: Magi3r <magier dot mit dot f3erball at gmail dot com>
pkgname='python-jax-bin'
_name='jax'
pkgver=0.4.35
pkgrel=1
pkgdesc='Composable transformations of Python+NumPy programs'
arch=('any')
url='https://github.com/jax-ml/jax/'
license=('Apache')
depends=('python-absl'
         'python-jaxlib>=0.4.35'
         'python-ml-dtypes'
         'python-numpy'
         'python-opt_einsum'
         'python-scipy')
optdepends=(
    'python-protobuf: Australis'
    'python-requests: Distributed computations'
)
provides=("python-jax")
conflicts=("python-jax")
makedepends=('python-build' 'python-installer' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('c0c986993026b10bf6f607fecb7417377460254640766ce40f1fef3fd139c12e')

build() {
	cd $_name-$pkgver
	python -m build --wheel --skip-dependency-check --no-isolation
}

check() {
	cd $_name-$pkgver
}

package() {
	cd $_name-$pkgver
	python -m installer --destdir="$pkgdir" dist/*.whl

	# Symlink license file
	local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
	install -d "$pkgdir"/usr/share/licenses/$pkgname
	ln -s "$site_packages"/$_name-$pkgver.dist-info/LICENSE \
	   "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}