summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0613e2dc44ffc01df792def3ef949611182602e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
pkgname='python-pytest-cython'
_pkgname='pytest-cython'
pkgver='0.1.1'
pkgrel=1
pkgdesc="A plugin for testing Cython extension modules."
url="https://github.com/lgpage/pytest-cython"
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"
        "43f3d148738f77f8579caae49f74f8d548d3f0a9.patch")
sha256sums=('93d80c38c38029b8cd97a6eff3972225cb69c489ee5cac54e668ff76f6200a90'
            '0db1f2b6cd2b909fd0214d14a267a9342a74575ff3aa81ea51d3d997b8e11a61')

package() {
    cd "${_pkgname}-${pkgver}"
    python setup.py install --root="${pkgdir}" --optimize=1
}

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
}