void-packages/srcpkgs/python-pytest/template

40 lines
1.2 KiB
Bash

# Template file for 'python-pytest'
pkgname=python-pytest
version=4.6.7
revision=2
archs=noarch
wrksrc="${pkgname/python-//}-${version}"
build_style=python2-module
hostmakedepends="python-setuptools"
depends="python-atomicwrites python-attrs python-funcsigs python-more-itertools
python-pluggy python-py python-setuptools python-pathlib2 python-six
python-wcwidth python-hypothesis python-importlib_metadata
python-packaging"
checkdepends="$depends tox"
short_desc="Simple powerful testing with Python 2"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://pytest.org/en/latest/"
changelog="https://docs.pytest.org/en/latest/changelog.html"
distfiles="${PYPI_SITE}/p/pytest/pytest-${version}.tar.gz"
checksum=9ea149066f566c943d3122f4b1cf1b577cab73189d11f490b54703fa5fa9df50
alternatives="
pytest:pytest:/usr/bin/pytest2
pytest:py.test:/usr/bin/py.test2"
post_patch() {
vsed -i setup.py \
-e '/setup_requires=/d' \
-e "s|use_scm_version=.*|version=\"${version}\",|"
}
do_check() {
tox -e py27
}
post_install() {
mv ${DESTDIR}/usr/bin/pytest ${DESTDIR}/usr/bin/pytest2
mv ${DESTDIR}/usr/bin/py.test ${DESTDIR}/usr/bin/py.test2
vlicense LICENSE
}