diff --git a/BioArchLinux/python-pyjess/PKGBUILD b/BioArchLinux/python-pyjess/PKGBUILD new file mode 100644 index 0000000000..6593c6e776 --- /dev/null +++ b/BioArchLinux/python-pyjess/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Martin Larralde + +_name=pyjess +pkgname=python-${_name} +pkgver=0.9.1 +pkgrel=1 +pkgdesc="Cython bindings and Python interface to Jess, a 3D template matching software." +url="https://github.com/althonos/pyjess" +arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') +license=("MIT") +depends=('python') +makedepends=('cython' 'python-build' 'python-installer' 'cmake' 'ninja' 'python-scikit-build-core') +source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz") +sha256sums=(196630cd5dbd731d68bc74746acc8cf03e8b09c4c334f6e926ecc8ff352aeddd) + +build() { + cd "${srcdir}/${_name}-${pkgver}" + python -m build --wheel --no-isolation +} + +check() { + local machine=$(python -c 'import platform; print(platform.machine())') + whl="${srcdir}/${_name}-${pkgver}/dist/${_name}-${pkgver}-cp38-abi3-linux_${machine}.whl" + + if [ -e "${srcdir}/env" ]; then rm -rd "${srcdir}/env"; fi + python -m venv --symlinks --system-site-packages "${srcdir}/env" + source "${srcdir}/env/bin/activate" + python -m installer "$whl" + + python -m unittest ${_name}.tests +} + +package() { + local machine=$(python -c 'import platform; print(platform.machine())') + whl="${srcdir}/${_name}-${pkgver}/dist/${_name}-${pkgver}-cp38-abi3-linux_${machine}.whl" + + python -m installer --prefix="${pkgdir}/usr" "$whl" + install -Dm644 "${srcdir}/${_name}-${pkgver}/COPYING" "$pkgdir/usr/share/licenses/$pkgname/COPYING" +} diff --git a/BioArchLinux/python-pyjess/lilac.yaml b/BioArchLinux/python-pyjess/lilac.yaml new file mode 100644 index 0000000000..df28357f10 --- /dev/null +++ b/BioArchLinux/python-pyjess/lilac.yaml @@ -0,0 +1,14 @@ +maintainers: + - github: althonos + email: althonosdev@gmail.com +build_prefix: extra-x86_64 +pre_build_script: | + update_pkgver_and_pkgrel(_G.newver.lstrip('v')) + run_cmd(['updpkgsums']) +post_build_script: | + git_pkgbuild_commit() + update_aur_repo() +update_on: + - source: pypi + pypi: pyjess + - alias: python