blob: ede428ea5cc972511195091520e4457b8a86dc90 (
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
|
# Maintainer: Daniel Bershatsky <d.bershatsky2@skoltech.ru> (aur.archlinux.org/account/daskol)
# Contributor: Will Handley <wh260@cam.ac.uk> (aur.archlinux.org/account/wjhandley)
pkgname=python-flax
_pkgname=${pkgname#python-}
pkgver=0.12.5
pkgrel=1
pkgdesc='A neural network library and ecosystem for JAX designed for flexibility'
arch=('any')
url='https://github.com/google/flax'
license=('Apache-2.0')
groups=('jax')
depends=(
'python-jax'
'python-msgpack'
'python-numpy'
'python-optax'
'python-orbax-checkpoint'
'python-orbax-export'
'python-rich'
'python-tensorstore'
'python-treescope'
'python-typing_extensions'
'python-yaml'
)
makedepends=('python-build' 'python-installer' 'python-setuptools'
'python-setuptools-scm' 'python-wheel')
optdepends=(
'python-matplotlib: Export to TensorBoard.'
'tensorboard: TensorBoard visualization and logging.'
)
source=("flax-$pkgver.tar.gz::https://github.com/google/flax/archive/refs/tags/v${pkgver}.tar.gz"
'python-flax.diff')
sha256sums=('6b9bbbbdf78ecbd68381bd6d9d4f427db083ad5d95d5de159125826b3786741c'
'3b769ed13cab8ee6374ccd85089da7c0ab9a11faeb79ad050aa640b52328742a')
prepare() {
cd $_pkgname-$pkgver
patch -p 1 -i../python-flax.diff
}
build() {
python -m build -nw $_pkgname-$pkgver
}
check() {
cd $_pkgname-$pkgver
PYTHONPATH=$PWD python -c 'import flax'
}
package() {
cd $_pkgname-$pkgver
install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
python -m installer --compile-bytecode=1 --destdir=$pkgdir \
dist/$_pkgname-$pkgver*.whl
}
|