mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 09:17:16 +08:00
17bb03e88f
added new checkdeps
62 lines
1.9 KiB
Bash
62 lines
1.9 KiB
Bash
pkgbase=python-pytest
|
|
pkgname=('python2-pytest' 'python3-pytest')
|
|
pkgver=3.2.3
|
|
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' 'python3-pluggy'
|
|
'python2-pluggy')
|
|
checkdepends=('lsof' 'python3-nose' 'python2-nose' 'python3-mock' 'python2-mock' 'python3-tox'
|
|
'python2-tox' 'python3-yaml' 'python2-yaml' 'python3-pytest-xdist'
|
|
'python2-pytest-xdist' 'python3-twisted' 'python2-twisted' 'python3-requests'
|
|
'python2-requests' 'python3-hypothesis' 'python2-hypothesis')
|
|
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest/archive/$pkgver.tar.gz")
|
|
sha512sums=('SKIP')
|
|
|
|
prepare() {
|
|
rm -r pytest-$pkgver/_pytest/vendored_packages
|
|
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}
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/pytest-$pkgver
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir"/pytest-$pkgver-py2
|
|
python2 setup.py build
|
|
}
|
|
|
|
#check() {
|
|
# cd "$srcdir"/pytest-$pkgver
|
|
# python3 setup.py test
|
|
#
|
|
# cd "$srcdir"/pytest-$pkgver-py2
|
|
# python2 setup.py test
|
|
#}
|
|
|
|
package_python3-pytest() {
|
|
depends=('python3-py' 'python3-setuptools' 'python3-pluggy')
|
|
|
|
cd pytest-$pkgver
|
|
python3 setup.py install --root="$pkgdir" --optimize=1
|
|
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
}
|
|
|
|
package_python2-pytest() {
|
|
depends=('python2-py' 'python2-setuptools' 'python2-pluggy')
|
|
|
|
cd pytest-$pkgver-py2
|
|
python2 setup.py install --root="$pkgdir" --optimize=1
|
|
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
mv "$pkgdir"/usr/bin/py.test{,2}
|
|
mv "$pkgdir"/usr/bin/pytest{,2}
|
|
}
|