60 lines
1.8 KiB
Bash
60 lines
1.8 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=pytest-runner
|
|
pkgbase=python-${_realname}
|
|
pkgname=("python3-${_realname}" "python2-${_realname}")
|
|
pkgver=4.4
|
|
pkgrel=1
|
|
pkgdesc="Invoke py.test as distutils command with dependency resolution"
|
|
arch=('any')
|
|
license=('MIT')
|
|
url="https://github.com/pytest-dev/pytest-runner"
|
|
makedepends=('python2-pytest' 'python3-pytest' 'python2-setuptools-scm' 'python3-setuptools-scm')
|
|
#checkdepends=('python3-pytest-virtualenv' 'python2-pytest-virtualenv' 'python3-pytest-flake8'
|
|
# 'python2-pytest-flake8')
|
|
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-runner/archive/$pkgver.tar.gz")
|
|
sha512sums=('a369bea32accebc0cb1184ca6fbc7c73c9385c2745f14e1102c3da96ce0a41b901d0b20eaef1e0eecb06f448414624b3edb14f34829c1dc8953c0d472dc38862')
|
|
|
|
prepare() {
|
|
for builddir in python{2,3}-build-${CARCH}; do
|
|
rm -rf ${builddir} | true
|
|
cp -r "${_realname}-${pkgver}" "${builddir}"
|
|
done
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
|
}
|
|
|
|
build() {
|
|
for pver in {2,3}; do
|
|
msg "Python ${pver} build for ${CARCH}"
|
|
cd "${srcdir}/python${pver}-build-${CARCH}"
|
|
python${pver} setup.py build
|
|
done
|
|
}
|
|
|
|
#check() {
|
|
# cd "${srcdir}"/pytest-runner-${pkgver}
|
|
# python setup.py egg_info
|
|
# PYTHONPATH="$PWD" pytest
|
|
|
|
# cd "${srcdir}"/pytest-runner-${pkgver}-py2
|
|
# python2 setup.py egg_info
|
|
# PYTHONPATH="$PWD" pytest2
|
|
#}
|
|
|
|
package_python3-pytest-runner() {
|
|
depends=('python3-pytest')
|
|
|
|
cd "${srcdir}/python3-build-${CARCH}"
|
|
python3 setup.py install --root="${pkgdir}" --optimize=1
|
|
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
|
}
|
|
|
|
package_python2-pytest-runner() {
|
|
depends=('python2-pytest')
|
|
|
|
cd "${srcdir}/python2-build-${CARCH}"
|
|
python2 setup.py install --root="${pkgdir}" --optimize=1
|
|
install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
|
|
}
|