void-packages/srcpkgs/python3-pytest/template
2020-02-21 16:36:49 +01:00

42 lines
1.3 KiB
Bash

# Template file for 'python3-pytest'
pkgname=python3-pytest
version=5.3.5
revision=1
archs=noarch
wrksrc="pytest-${version}"
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3-py python3-packaging python3-attrs python3-more-itertools
python3-atomicwrites python3-pluggy python3-wcwidth"
checkdepends="$depends python3-argcomplete python3-hypothesis python3-mock
python3-nose python3-requests python3-parsing python3-xmlschema"
short_desc="Simple powerful testing with Python 3"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://docs.pytest.org/en/latest/"
changelog="https://docs.pytest.org/en/latest/changelog.html"
distfiles="${PYPI_SITE}/p/pytest/pytest-${version}.tar.gz"
checksum=0d5fe9189a148acc3c3eb2ac8e1ac0742cb7618c084f3d228baaec0c254b318d
alternatives="
pytest:pytest:/usr/bin/pytest3
pytest:py.test:/usr/bin/py.test3"
post_patch() {
vsed -i setup.py \
-e '/setup_requires=/d' \
-e "s|use_scm_version=.*|version=\"${version}\",|"
# This test depends on tox, and/or egg-info
# merely check pytest and py.test were generated
rm testing/test_entry_points.py
}
do_check() {
PYTHONPATH=$(pwd)/build/lib python3 -m pytest
}
post_install() {
mv ${DESTDIR}/usr/bin/pytest ${DESTDIR}/usr/bin/pytest3
mv ${DESTDIR}/usr/bin/py.test ${DESTDIR}/usr/bin/py.test3
vlicense LICENSE
}