diff options
author | lilac | 2021-02-05 10:41:29 +0800 |
---|---|---|
committer | lilac | 2021-02-05 10:41:29 +0800 |
commit | c1e71ee88a3ab5096f24e917686e9ba19fe059c9 (patch) | |
tree | 3c1610cbcc83fa0bb8b2358151e15530794b866e /PKGBUILD | |
parent | 1d73a6bdc8018d5e4359aa1199f0fe00a36448cf (diff) | |
download | aur-c1e71ee88a3ab5096f24e917686e9ba19fe059c9.tar.gz |
[lilac] updated to 1.8.2-2
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -1,31 +1,40 @@ # Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org> pkgname=python-tf2onnx -pkgver=1.8.1 -pkgrel=1 +pkgver=1.8.2 +pkgrel=2 pkgdesc='Convert TensorFlow models to ONNX' arch=(any) url='https://github.com/onnx/tensorflow-onnx' license=(MIT) depends=(python python-tensorflow python-numpy python-onnx python-requests python-six) -makedepends=(python-setuptools) +makedepends=(python-setuptools python-build python-install python-wheel) checkdepends=(python-pytest python-graphviz python-parameterized python-yaml python-onnxruntime) source=("https://github.com/onnx/tensorflow-onnx/archive/v$pkgver/tf2onnx-v$pkgver.tar.gz") -sha256sums=('fc612a2fca6426c29aeb536e1aa514941a7a4fa8a32b49cab0601e9be0090f7c') +sha256sums=('cfea74d85bcf5e5e925548901c948df3abaae9484e2998a2398bdc6d4bc9ae8a') + +prepare() { + cd tensorflow-onnx-$pkgver + sed -i -r 's#--cov\S+##' setup.cfg + sed -i "s#'pytest-runner'##" setup.py +} build() { cd tensorflow-onnx-$pkgver - python setup.py build + python -m build --wheel --no-isolation + python -m install --cache dist/*.whl } check() { cd tensorflow-onnx-$pkgver - # The default opset is 8, in which lots of tests are skipped - PYTHONPATH="$PWD" TF2ONNX_TEST_OPSET=12 pytest -rs -c /dev/null tests + # Some tests fail most likely due to changes in NumPy 1.20. Actually TensorFlow does not + # completely work with NumPy 1.20 either [1]. + # https://github.com/tensorflow/tensorflow/issues/44654#issuecomment-771919878 + PYTHONPATH="$PWD" pytest tests -k 'not test_unsorted_segment_ops' } package() { cd tensorflow-onnx-$pkgver - python setup.py install --root="$pkgdir" --optimize=1 --skip-build + python -m install --destdir="$pkgdir" --skip-build --verify-dependencies install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname } |