diff options
author | Carlos Aznarán Laos | 2021-08-12 19:23:45 -0500 |
---|---|---|
committer | Carlos Aznarán Laos | 2021-08-12 19:23:45 -0500 |
commit | a81c57010f941e4ff48be242e82ac0f4968b7727 (patch) | |
tree | d4fae541c134cc8463ca99568e55a73293a43898 | |
parent | 93d19ebc0dfa61f338edbe666e67b6a1b351e82c (diff) | |
download | aur-a81c57010f941e4ff48be242e82ac0f4968b7727.tar.gz |
Add check() function
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 11 |
2 files changed, 12 insertions, 3 deletions
@@ -1,10 +1,12 @@ pkgbase = python-pytest-flakes pkgdesc = pytest plugin to check source code with pyflakes pkgver = 4.0.3 - pkgrel = 1 + pkgrel = 2 url = https://github.com/asmeurer/pytest-flakes arch = any license = MIT + checkdepends = python-coverage + checkdepends = python-pytest-pep8 makedepends = python-setuptools depends = python-pytest depends = python-pyflakes @@ -3,14 +3,14 @@ _base=pytest-flakes pkgname=python-${_base} pkgver=4.0.3 -pkgrel=1 +pkgrel=2 pkgdesc="pytest plugin to check source code with pyflakes" arch=('any') url="https://github.com/asmeurer/${_base}" license=(MIT) depends=(python-pytest python-pyflakes) makedepends=(python-setuptools) -# checkdepends=(python-coverage) #python-pytest-pep8 +checkdepends=(python-coverage python-pytest-pep8) source=(https://pypi.org/packages/source/${_base::1}/${_base}/${_base}-${pkgver}.tar.gz) sha512sums=('ca63d68063cf48789d86dee3707b3ea7c5076fc1f636e17f408ad6f444303fb3a701af8d1e464d49af745e350272bffe8596853a52c01baa0bdb0b6b0c0bb303') @@ -21,6 +21,13 @@ build() { python setup.py build } +check() { + cd "${_base}-${pkgver}" + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + python setup.py install --root="${PWD}/tmp_install" --optimize=1 --skip-build + PYTHONPATH="$PWD/tmp_install/$site_packages" py.test +} + package() { cd "${_base}-${pkgver}" export PYTHONHASHSEED=0 |