summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorGuillaume Horel2020-12-18 21:57:59 -0500
committerGuillaume Horel2020-12-18 21:57:59 -0500
commit1e1bd64a1c61d54c49814615f48088ad66e61148 (patch)
treeb552ded5e3262b6f144d5339a27609ea977908f1 /PKGBUILD
parent8d7c14649ffa77fa3a561ea03846a60362ac9978 (diff)
downloadaur-1e1bd64a1c61d54c49814615f48088ad66e61148.tar.gz
fix tests
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD31
1 files changed, 21 insertions, 10 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c2efaf26b13..e3012da8bff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,24 +2,35 @@
pkgname='python-pytest-cython'
_pkgname='pytest-cython'
pkgver='0.1.0'
-pkgrel=1
+pkgrel=2
pkgdesc="A plugin for testing Cython extension modules."
url="https://github.com/lgpage/pytest-cython"
-checkdepends=('python-pytest')
-depends=('python')
+checkdepends=('cython' 'python-pytest')
+depends=()
makedepends=('python-setuptools')
optdepends=()
license=('MIT')
arch=('any')
-source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
-sha256sums=('90fa7e4e619bababeb433d3ba173a80d20473cce0bf3dce2c0e6f298becf5998')
+source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+ "43f3d148738f77f8579caae49f74f8d548d3f0a9.patch")
+sha256sums=('90fa7e4e619bababeb433d3ba173a80d20473cce0bf3dce2c0e6f298becf5998'
+ '0db1f2b6cd2b909fd0214d14a267a9342a74575ff3aa81ea51d3d997b8e11a61')
+
+prepare() {
+ cd "${_pkgname}-${pkgver}"
+ patch -l -p1 -i ../43f3d148738f77f8579caae49f74f8d548d3f0a9.patch
+}
package() {
- cd "${srcdir}/${_pkgname}-${pkgver}"
+ cd "${_pkgname}-${pkgver}"
python setup.py install --root="${pkgdir}" --optimize=1
}
-#check() {
- #cd "$srcdir/$_pkgname-${pkgver}"
- #python setup.py test
-#}
+check() {
+ cd "$_pkgname-${pkgver}/tests"
+ pushd example-project > /dev/null
+ python setup.py build_ext --inplace --use-cython
+ popd > /dev/null
+ cd ..
+ PY_IGNORE_IMPORTMISMATCH=1 PYTHONPATH=src pytest
+}