diff options
author | Carlos Aznarán Laos | 2021-12-06 23:50:39 -0500 |
---|---|---|
committer | Carlos Aznarán Laos | 2021-12-06 23:50:39 -0500 |
commit | 59d2d5b0d60f5f1d27f1aec4902422a75fe7643e (patch) | |
tree | 50ed6cf790aca4d1eeebc09c20a6061c34cbac0e | |
parent | 735a8b5371e51e1cfe33fc0ad4c777c7ad50b690 (diff) | |
download | aur-59d2d5b0d60f5f1d27f1aec4902422a75fe7643e.tar.gz |
Add check() function
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | PKGBUILD | 34 |
3 files changed, 29 insertions, 17 deletions
@@ -1,14 +1,15 @@ pkgbase = python-pytaglib - pkgdesc = Python bindigs for the TagLib audio metadata library + pkgdesc = Python audio tagging library pkgver = 1.4.6 - pkgrel = 4 - url = https://pypi.org/project/pytaglib + pkgrel = 5 + url = https://github.com/supermihi/pytaglib arch = x86_64 license = GPL3 + checkdepends = python-pytest makedepends = python-setuptools depends = python depends = taglib - source = https://pypi.org/packages/source/p/pytaglib/pytaglib-1.4.6.tar.gz - sha256sums = 16daf54e78fb56442293d20d7659097470ecac9031f33037f9d53baa31382952 + source = https://github.com/supermihi/pytaglib/archive/v1.4.6.tar.gz + sha512sums = 4b438759440790b3c850cf165b553f7e6066bf0064e041cca3e46831046b12a87decd4429772ea0c50e1b27cbbd2c82ba709361bc01aa2e8ec3064458aeae0ff pkgname = python-pytaglib diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..f59ec20aabf5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*
\ No newline at end of file @@ -1,24 +1,34 @@ -# Maintainer: Antonio Rojas <arojas@archlinux.org> +# Maintainer: Carlos Aznarán <caznaranl@uni.pe> +# Contributor: Antonio Rojas <arojas@archlinux.org> # Contributor: Michael Helmling <michaelhelmling@posteo.de> - -pkgname=python-pytaglib +_base=pytaglib +pkgname=python-${_base} pkgver=1.4.6 -pkgrel=4 -pkgdesc='Python bindigs for the TagLib audio metadata library' +pkgrel=5 +pkgdesc="Python audio tagging library" arch=(x86_64) -url="https://pypi.org/project/pytaglib" -license=('GPL3') +url="https://github.com/supermihi/${_base}" +license=(GPL3) depends=(python taglib) makedepends=(python-setuptools) -source=("https://pypi.org/packages/source/p/pytaglib/pytaglib-$pkgver.tar.gz") -sha256sums=('16daf54e78fb56442293d20d7659097470ecac9031f33037f9d53baa31382952') +checkdepends=(python-pytest) +source=(${url}/archive/v${pkgver}.tar.gz) +sha512sums=('4b438759440790b3c850cf165b553f7e6066bf0064e041cca3e46831046b12a87decd4429772ea0c50e1b27cbbd2c82ba709361bc01aa2e8ec3064458aeae0ff') build() { - cd pytaglib-$pkgver + cd "${_base}-${pkgver}" python setup.py build } +check() { + cd "${_base}-${pkgver}" + local _pyversion=$(python -c "import sys; print(sys.version[:3])") + PYTHONPATH="${PWD}/build/lib.linux-${CARCH}-${_pyversion}:${PYTHONPATH}" python -m pytest tests +} + package() { - cd pytaglib-$pkgver - python setup.py install --root="$pkgdir" --optimize=1 + cd "${_base}-${pkgver}" + export PYTHONHASHSEED=0 + PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build + install -Dm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}" } |