python-pytest: Different versions for python2 and 3
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
||||
|
||||
pkgbase=python-pytest
|
||||
pkgname=('python3-pytest' 'python2-pytest')
|
||||
pkgver=5.0.1
|
||||
pkgrel=1
|
||||
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=('738f8a3b38ad36be6a66ad036999a9b78023c40dd6c9cb9bd01a023841011ae276fec556eb6dabf35638a6c7cf49304c140d90d5174ded710e0f51b51145e5cb')
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user