blob: 6aee5e3343866b18bbcbbd26badaba019ce296ac (
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
|
# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
pkgname='python-dm-haiku'
_pkgname=${pkgname#python-}
pkgver=0.0.15
pkgrel=1
pkgdesc='A library for building neural networks in JAX'
arch=('x86_64')
url='https://github.com/deepmind/dm-haiku'
license=('Apache')
groups=('deepmind' 'jax')
depends=('python-absl' 'python-jax' 'python-jmp' 'python-numpy' 'python-tabulate')
makedepends=('python-build' 'python-installer' 'python-setuptools')
optdepends=(
'python-flax: Integration with flax'
)
source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/deepmind/${_pkgname}/archive/refs/tags/v${pkgver}.tar.gz"
'python-dm-haiku.diff')
sha256sums=('6fde1130d0634007750a1a1f6e26f78b3d09086c428c65565a519d04a6f501ab'
'SKIP')
prepare() {
cd "$_pkgname-$pkgver"
patch -p1 -i ../python-dm-haiku.diff
}
build() {
python -m build -nw "$_pkgname-$pkgver"
}
check() {
cd "$_pkgname-$pkgver"
python -c 'import haiku'
}
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
}
|