diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 36 |
1 files changed, 22 insertions, 14 deletions
@@ -1,24 +1,32 @@ -#Automatically generated by pip2arch on 2015-08-31 +# Maintainer: Luis Martinez <luis dot martinez at disroot dot org> pkgname=python-pycddlib -pkgver=1.0.4 -pkgrel=2 -pkgdesc="pycddlib is a Python wrapper for Komei Fukuda's cddlib." -url="http://pypi.python.org/pypi/pycddlib" +_pkg="${pkgname#python-}" +pkgver=2.1.6 +pkgrel=1 +pkgdesc='Python wrapper for cddlib' +license=('GPL') +arch=('x86_64') +url='https://github.com/mcmtroffaes/pycddlib' # Note: cddlib is bundled with pycddlib depends=('python' 'gmp') -makedepends=('python') -license=('GPL') -arch=('any') -source=("https://pypi.python.org/packages/source/p/pycddlib/pycddlib-$pkgver.zip") -sha256sums=('d42e50e21310826121163a3c73b40ed0e52e3b29f9cf97fd3a26a7cd71f6664f') +makedepends=('cython' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel') +checkdepends=('python-pytest' 'python-numpy') +source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/p/$_pkg/$_pkg-$pkgver.tar.gz") +sha256sums=('c7c87c0992edb608e999c84b3977bdc36035e651bed4ef089427f3b0e840aa3d') build() { - cd $srcdir/pycddlib-$pkgver - python setup.py build + cd "$_pkg-$pkgver" + python -m build --wheel --no-isolation +} + +check() { + cd "$_pkg-$pkgver" + local _version="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')" + PYTHONPATH="$PWD/build/lib.linux-$CARCH-$_version" pytest -x } package() { - cd $srcdir/pycddlib-$pkgver - python setup.py install --root="$pkgdir" --optimize=1 + cd "$_pkg-$pkgver" + PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir/" dist/*.whl } |