summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: df7676650f4c24e74a346ffdc0c514582407285f (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
# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
pkgname=python-orbax-export
_pkgname=${pkgname#python-}
pkgver=0.0.6
_pkgver=0.11.5
pkgrel=2
pkgdesc='Orbax provides common utility libraries for JAX users (export).'
arch=('any')
url='https://github.com/google/orbax'
license=('Apache')
groups=('jax')
depends=(
    'python-absl'
    'python-dataclasses-json'
    'python-etils'
    'python-jax'
    'python-jaxtyping'
    'python-numpy'
    'python-orbax-checkpoint'
)
makedepends=('python-build' 'python-flit-core' 'python-installer')
optdepends=(
    'python-tensorflow: Execution engine for saved models.'
)
conflicts=('python-orbax')
replaces=('python-orbax')
source=("$_pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$_pkgver.tar.gz")
sha256sums=('37947bc16fc7d0a423fa3a4d5700d9ec9e9b886a29a23923392b691b83e38e96')

build() {
    python -m build -nw orbax-$_pkgver/export
}

package() {
    cd orbax-$_pkgver/export/
    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    python -m installer --compile-bytecode=1 --destdir=$pkgdir \
        dist/orbax_export-$pkgver-*.whl
    find $pkgdir -iname '*_test.py' -delete
}