blob: bf2eb2d6cd9f808099dc98493d2026a2592f2c06 (
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
|
# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
pkgname=python-chex
_pkgname=${pkgname#python-}
pkgver=0.1.91
pkgrel=2
pkgdesc="A library of utilities for helping to write reliable JAX code"
arch=('any')
url="https://github.com/google-deepmind/chex"
license=('Apache-2.0')
groups=('deepmind' 'jax')
depends=('python-absl'
'python-jax>=0.4.27'
'python-numpy'
'python-toolz'
'python-typing_extensions')
makedepends=('python-build' 'python-installer' 'python-flit-core'
'python-wheel')
checkdepends=('python-cloudpickle' 'python-dm-tree' 'python-pytest')
source=("$_pkgname-$pkgver.tar.gz::https://github.com/google-deepmind/$_pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('0e67bc74c6914f4515c45927ff396c3d242e7fd9fe5c1da45ec937b85ccfaefc')
build() {
python -m build -nw "$_pkgname-$pkgver"
}
check() {
cd "$_pkgname-$pkgver"
export PYTHONPATH=$PWD
pytest -v -s chex
}
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
}
|