80 lines
2.3 KiB
Bash
80 lines
2.3 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
pkgbase=python-pytest
|
|
pkgname=('python3-pytest' 'python2-pytest')
|
|
pkgver=3.9.3
|
|
pkgrel=2
|
|
pkgdesc="Simple powerful testing with Python"
|
|
arch=('any')
|
|
license=('MIT')
|
|
url="https://pytest.org/"
|
|
makedepends=('python2-atomicwrites'
|
|
'python3-atomicwrites'
|
|
'python2-attrs'
|
|
'python3-attrs'
|
|
'python2-funcsigs'
|
|
'python2-pathlib2'
|
|
'python2-pluggy'
|
|
'python3-pluggy'
|
|
'python2-py'
|
|
'python3-py'
|
|
'python2-setuptools'
|
|
'python3-setuptools'
|
|
'python2-setuptools-scm'
|
|
'python3-setuptools-scm'
|
|
'python2-six'
|
|
'python3-six')
|
|
source=("pytest-${pkgver}.tar.gz::https://github.com/pytest-dev/pytest/archive/${pkgver}.tar.gz")
|
|
sha512sums=('6ae634e234a0384536d62b0855ff3317fa2558f9480a3814f4aa9fffd034da1016eb05304233e41ac8dff6d60fb7f3590f70582fa9ed8ec5f22abfb3be36bc05')
|
|
|
|
prepare() {
|
|
sed -i "s/'_pytest.vendored_packages'//" pytest-${pkgver}/setup.py
|
|
sed -i 's/assert numentries == 0/assert numentries == 26/' pytest-${pkgver}/testing/python/collect.py
|
|
cp -a pytest-${pkgver}{,-py2}
|
|
}
|
|
|
|
build() {
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
|
|
|
|
cd "${srcdir}/pytest-${pkgver}"
|
|
python3 setup.py build
|
|
|
|
cd "${srcdir}/pytest-${pkgver}-py2"
|
|
python2 setup.py build
|
|
}
|
|
|
|
package_python3-pytest() {
|
|
depends=('python3'
|
|
'python3-atomicwrites'
|
|
'python3-attrs'
|
|
'python3-more-itertools'
|
|
'python3-pluggy'
|
|
'python3-py'
|
|
'python3-setuptools'
|
|
'python3-six')
|
|
|
|
cd pytest-${pkgver}
|
|
python3 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
|
|
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
}
|
|
|
|
package_python2-pytest() {
|
|
depends=('python2'
|
|
'python2-atomicwrites'
|
|
'python2-attrs'
|
|
'python2-more-itertools'
|
|
'python3-pluggy'
|
|
'python2-py'
|
|
'python2-setuptools'
|
|
'python3-six')
|
|
|
|
cd pytest-${pkgver}-py2
|
|
python2 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
|
|
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
|
|
for f in {py.test,pytest}; do
|
|
mv "${pkgdir}"/usr/bin/${f}{,2}
|
|
done
|
|
}
|
|
|