mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
python-pyfaidx: enable builtin tests
This commit is contained in:
parent
8195a3f234
commit
ceb9714fdb
1 changed files with 33 additions and 7 deletions
|
@ -4,11 +4,11 @@
|
|||
pkgname=python-pyfaidx
|
||||
_name=pyfaidx
|
||||
pkgver=0.8.1.3
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Efficient pythonic random access to fasta subsequences."
|
||||
arch=("any")
|
||||
url="https://pypi.python.org/pypi/pyfaidx"
|
||||
license=("BSD")
|
||||
license=("BSD-3-Clause")
|
||||
depends=(
|
||||
'python'
|
||||
'python-setuptools'
|
||||
|
@ -18,17 +18,43 @@ depends=(
|
|||
)
|
||||
makedepends=('python-build'
|
||||
'python-installer'
|
||||
'python-wheel')
|
||||
source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
|
||||
sha256sums=('feb599f8dfd192cf68bdb24969a5fd8f46772a7bd75d059e764bfd86b888e9b2')
|
||||
'python-wheel'
|
||||
'python-pytest'
|
||||
'python-pytest-cov'
|
||||
'cython'
|
||||
'python-numpy'
|
||||
'python-biopython'
|
||||
'python-requests'
|
||||
'python-coverage'
|
||||
'python-fsspec'
|
||||
'git')
|
||||
|
||||
source=("${_name}::git+https://github.com/mdshw5/pyfaidx.git#tag=v${pkgver}")
|
||||
|
||||
sha256sums=('7b3d419980574327456c47fa401160a3025c06a1d1bfc34666d1fcb2c1f78d97')
|
||||
|
||||
prepare() {
|
||||
git -C "${srcdir}/${_name}" clean -dfx
|
||||
touch "${srcdir}/${_name}"/tests/__init__.py
|
||||
echo "downloading test nucleotide data from NCBI"
|
||||
python "${srcdir}/${_name}"/tests/data/download_gene_fasta.py
|
||||
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$_name-$pkgver"
|
||||
cd "$_name"
|
||||
export SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver"
|
||||
python -m build --wheel --no-isolation
|
||||
}
|
||||
|
||||
check(){
|
||||
cd $_name
|
||||
|
||||
local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
|
||||
PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-$python_version" pytest
|
||||
}
|
||||
package() {
|
||||
cd "$_name-$pkgver"
|
||||
cd "$_name"
|
||||
python -m installer --destdir="$pkgdir" dist/*.whl
|
||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue