summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 89e2cb19a7c103e096fab7bf3174fd63b1693ed9 (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
# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>

pkgname='python-jax'
pkgver=0.7.0
pkgrel=1
pkgdesc='Composable transformations of Python+NumPy programs'
arch=('any')
url='https://github.com/jax-ml/jax/'
license=('Apache-2.0')
groups=('jax')
depends=(
    'python-jaxlib>=0.7.0'
    'python-ml-dtypes'
    'python-numpy'
    'python-opt_einsum'
    'python-scipy'
)
optdepends=(
    'python-protobuf: Australis'
    'python-requests: Distributed computations'
)
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
source=("jax-${pkgver}.tar.gz::$url/archive/refs/tags/jax-v${pkgver}.tar.gz")
sha256sums=('518966801e4402667e77915c2dc7cf1a178a80e22ff253204a837f207a87fcde')

build() {
    JAX_RELEASE=$pkgver python -m build -nw jax-jax-v$pkgver
}

package() {
    cd jax-jax-v$pkgver
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    python -m installer --compile-bytecode=1 --destdir=$pkgdir \
        dist/jax-$pkgver-*.whl
}