mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
41 lines
1.7 KiB
Bash
41 lines
1.7 KiB
Bash
# Maintainer: Martin Larralde <martin.larralde@embl.de>
|
|
|
|
_name=pyfastani
|
|
pkgname=python-${_name}
|
|
pkgver=0.6.1
|
|
pkgrel=1
|
|
pkgdesc="Cython bindings and Python interface to FastANI, a method for fast whole-genome similarity estimation"
|
|
url="https://github.com/althonos/${_name}"
|
|
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
|
license=("MIT")
|
|
depends=('python' 'gcc-libs' 'glibc')
|
|
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")
|
|
noextract=()
|
|
sha256sums=('cd0c7858c71524584f66eb5b7989f4508098487c5f5629648105edad308ca6a5')
|
|
|
|
build() {
|
|
cd "${srcdir}/${_name}-${pkgver}"
|
|
python -m build --wheel --no-isolation --skip-dependency-check
|
|
}
|
|
|
|
check() {
|
|
local abitag=$(python -c 'import sys; print(*sys.version_info[:2], sep="")')
|
|
local machine=$(python -c 'import platform; print(platform.machine())')
|
|
whl="${srcdir}/${_name}-${pkgver}/dist/${_name}-${pkgver}-cp${abitag}-cp${abitag}-linux_${machine}.whl"
|
|
|
|
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 abitag=$(python -c 'import sys; print(*sys.version_info[:2], sep="")')
|
|
local machine=$(python -c 'import platform; print(platform.machine())')
|
|
whl="${srcdir}/${_name}-${pkgver}/dist/${_name}-${pkgver}-cp${abitag}-cp${abitag}-linux_${machine}.whl"
|
|
|
|
python -m installer --prefix="${pkgdir}/usr" "$whl"
|
|
install -Dm644 ${srcdir}/${_name}-${pkgver}/COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
|
|
}
|