diff options
author | Chih-Hsuan Yen | 2021-10-30 23:00:42 +0800 |
---|---|---|
committer | Chih-Hsuan Yen | 2021-10-30 23:00:42 +0800 |
commit | d1a5a3bb5fdbb6c4789b9c61c2e8b548fe337753 (patch) | |
tree | 8be771f06e4758b6f29bb3d51f48aac54eff82ef | |
parent | 4749a4855e81c0a5bcf04e1815eee6df55911f61 (diff) | |
download | aur-d1a5a3bb5fdbb6c4789b9c61c2e8b548fe337753.tar.gz |
adopt and update
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | PKGBUILD | 107 |
3 files changed, 50 insertions, 102 deletions
@@ -1,35 +1,24 @@ pkgbase = python-tensorly pkgdesc = Simple and Fast Tensor Learning in Python - pkgver = 0.3.0 + pkgver = 0.6.0 pkgrel = 1 - url = http://tensorly.org/stable/home.html + url = https://tensorly.org/stable/home.html changelog = python-tensorly.changelog - arch = x86_64 + arch = any license = BSD checkdepends = python-pytest - checkdepends = python2-pytest + checkdepends = python-numpy + checkdepends = python-pytorch + checkdepends = python-tensorflow + makedepends = python-setuptools depends = python - depends = python2 - optdepends = mxnet optdepends = python-numpy - optdepends = python2-numpy optdepends = python-pytorch - optdepends = python-pytorch-cuda - optdepends = python2-pytorch - optdepends = python2-pytorch-cuda - source = tensorly-0.3.0.tar.gz::https://github.com/tensorly/tensorly/archive/0.3.0.tar.gz - md5sums = d2bb823c87246b4ff45a175f984beb3d - -pkgname = python-tensorly - depends = python + optdepends = python-tensorflow optdepends = mxnet - optdepends = python-numpy - optdepends = python-pytorch - optdepends = python-pytorch-cuda - -pkgname = python2-tensorly - depends = python2 - optdepends = python2-numpy - optdepends = python2-pytorch - optdepends = python2-pytorch-cuda + optdepends = python-cupy + optdepends = python-jax + source = tensorly-0.6.0.tar.gz::https://github.com/tensorly/tensorly/archive/0.6.0.tar.gz + sha256sums = e36a9124efd34f76fc727b0c45e92655a256231b56897591ee0d451ada279262 +pkgname = python-tensorly diff --git a/.gitignore b/.gitignore deleted file mode 100644 index b568e813bcb4..000000000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Blacklist everything by default to avoid accidentally committing something -* - -# Whitelist the following files and directories -!/*.changelog -!/.SRCINFO -!/.gitignore -!/PKGBUILD @@ -1,91 +1,58 @@ # -*- mode: shell-script -*- -# Maintainer: Dylon Edwards <deltaecho at archlinux dot us> +# Maintainer: Chih-Hsuan Yen <yan12125@archlinux.org> +# Contributor: Dylon Edwards <deltaecho at archlinux dot us> -pkgbase='python-tensorly' -pkgname=( - python{,2}-tensorly -) -pkgver=0.3.0 +pkgname='python-tensorly' +pkgver=0.6.0 pkgrel=1 pkgdesc="Simple and Fast Tensor Learning in Python" -arch=('x86_64') -url="http://tensorly.org/stable/home.html" +arch=('any') +url="https://tensorly.org/stable/home.html" license=('BSD') depends=( - python{,2} + python ) -checkdepends=( - python{,2}-pytest +makedepends=( + python-setuptools ) optdepends=( + python-numpy + python-pytorch + python-tensorflow +) +checkdepends=( + python-pytest + ${optdepends[@]} +) +# skipped backend tests +# - mxnet: somehow some tests fail +# - cupy: needs a GPU for tests +# - jax: build fails (https://github.com/google/jax/issues/7712) +optdepends+=( mxnet - python{,2}-numpy - python{,2}-pytorch{,-cuda} + python-cupy + python-jax ) -changelog="${pkgbase}.changelog" +changelog="${pkgname}.changelog" source=("tensorly-${pkgver}.tar.gz::https://github.com/tensorly/tensorly/archive/${pkgver}.tar.gz") -md5sums=('d2bb823c87246b4ff45a175f984beb3d') +sha256sums=('e36a9124efd34f76fc727b0c45e92655a256231b56897591ee0d451ada279262') -function check() { +build() { cd "tensorly-${pkgver}" - - # ------- # - # Python3 # - # ------- # - - if pacman -Qsq '^python-numpy$' &>/dev/null; then - echo "Testing against the numpy backend for Python3 ..." - TENSORLY_BACKEND='numpy' pytest -v tensorly - fi - - if pacman -Qsq '^python-pytorch(-cuda)?$' &>/dev/null; then - echo "Testing against the pytorch backend for Python3 ..." - TENSORLY_BACKEND='pytorch' pytest -v tensorly - fi - - if pacman -Qsq '^mxnet$' &>/dev/null; then - echo "Testing against the mxnet backend for Python3 ..." - TENSORLY_BACKEND='mxnet' pytest -v tensorly - fi - - # ------- # - # Python2 # - # ------- # - - if pacman -Qsq '^python2-numpy$' &>/dev/null; then - echo "Testing against the numpy backend for Python2 ..." - TENSORLY_BACKEND='numpy' pytest2 -v tensorly - fi - - if pacman -Qsq '^python2-pytorch(-cuda)?$' &>/dev/null; then - echo "Testing against the pytorch backend for Python2 ..." - TENSORLY_BACKEND='pytorch' pytest2 -v tensorly - fi + python setup.py build } -function package_python-tensorly() { - depends=( - python - ) - optdepends=( - mxnet - python-numpy - python-pytorch{,-cuda} - ) - +check() { cd "tensorly-${pkgver}" - python setup.py install --skip-build --root="$pkgdir" --optimize=1 -} -function package_python2-tensorly() { - depends=( - python2 - ) - optdepends=( - python2-numpy - python2-pytorch{,-cuda} - ) + for backend in numpy pytorch tensorflow; do + echo Testing against the $backend backend + TENSORLY_BACKEND=$backend pytest -v tensorly + done +} +package() { cd "tensorly-${pkgver}" - python2 setup.py install --skip-build --root="$pkgdir" --optimize=1 + python setup.py install --skip-build --root="$pkgdir" --optimize=1 + install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname } |