python-pytest: Update to 3.2.1

This commit is contained in:
Alexey Pavlov
2017-09-13 22:57:37 +03:00
parent 6593886174
commit 7c4635750a

View File

@@ -3,25 +3,29 @@
pkgbase=python-pytest
pkgname=('python3-pytest' 'python2-pytest')
pkgver=2.7.2
pkgver=3.2.1
pkgrel=1
pkgdesc="Simple powerful testing with Python"
arch=('any')
license=('MIT')
url="http://pytest.org/"
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-py' 'python2-py')
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-setuptools-scm' 'python2-setuptools-scm' 'python3-py' 'python2-py')
source=("https://pypi.python.org/packages/source/p/pytest/pytest-$pkgver.tar.gz")
sha512sums=('5474a4fe58437a4971fb21b1b37dad3c08e18e5d154931ff23e597f881100a3515bf0cf71d06b143465594ad2a91a96f84f4836d84c39691143c8d88ca7a4360')
sha512sums=('e0fff27fbf8fb79015520f338a418ad0c50ce75e8438e916ae40b1e2c2ad423b7629a9c7e08387b95eddd805f9887175c3159574b0b4c418c7bc9811c10fa7b9')
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() {
cd "$srcdir/pytest-${pkgver}"
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
cd "${srcdir}/pytest-${pkgver}"
python3 setup.py build
cd "$srcdir/pytest-${pkgver}-py2"
cd "${srcdir}/pytest-${pkgver}-py2"
python2 setup.py build
}
@@ -40,6 +44,8 @@ package_python2-pytest() {
python2 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
mv "${pkgdir}/usr/bin/py.test" "${pkgdir}/usr/bin/py.test2"
for f in {py.test,pytest}; do
mv "${pkgdir}"/usr/bin/${f}{,2}
done
}