# Template file for 'python3-pytest' pkgname=python3-pytest version=8.3.1 revision=2 build_style=python3-pep517 _common_deps="python3-iniconfig python3-pluggy" hostmakedepends="python3-setuptools_scm python3-Sphinx ${_common_deps}" depends="python3-packaging ${_common_deps}" checkdepends="$depends" short_desc="Simple powerful testing with Python 3" maintainer="Piotr Wójcik " 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=7e8e5c5abd6e93cb1cc151f23e57adc31fcf8cfd2a3ff2da63e23f732de35db6 alternatives=" pytest:pytest:/usr/bin/pytest3 pytest:py.test:/usr/bin/py.test3" if [ "$XBPS_CHECK_PKGS" = full ]; then # optional test dependencies: only for -K to minimize check-time cycles checkdepends+=" lsof python3-Jinja2 python3-Pygments python3-Twisted python3-argcomplete python3-attrs python3-decorator python3-hypothesis python3-mock python3-numpy python3-pexpect python3-pytest-xdist python3-requests python3-xmlschema" testjobs="-n $XBPS_MAKEJOBS" else # deselect tests that need some of the optional test dependencies make_check_args+=" --ignore testing/python/metafunc.py --ignore testing/test_assertion.py --ignore testing/test_junitxml.py --deselect testing/io/test_terminalwriter.py::test_code_highlight[with --deselect testing/test_entry_points.py::test_pytest_entry_points_are_identical --deselect testing/test_error_diffs.py::test_error_diff[Compare --deselect testing/test_terminal.py::test_color_yes --deselect testing/test_terminal.py::TestCodeHighlight::test_code_highlight_ " fi post_build() { PYTHONPATH="${PWD}/build/lib:${XBPS_CROSS_BASE}/${py3_lib}" make -C doc/en man vman doc/en/_build/man/pytest.1 } do_check() { PYTHONPATH="${PWD}/build/lib" python3 -m pytest \ ${testjobs} ${make_check_args} } post_install() { mv ${DESTDIR}/usr/bin/pytest ${DESTDIR}/usr/bin/pytest3 mv ${DESTDIR}/usr/bin/py.test ${DESTDIR}/usr/bin/py.test3 vlicense LICENSE }