diff --git a/srcpkgs/python3-pytest/patches/man-remove-sphinx-deps.patch b/srcpkgs/python3-pytest/patches/man-remove-sphinx-deps.patch index 5002a9c3079..cc4732e18eb 100644 --- a/srcpkgs/python3-pytest/patches/man-remove-sphinx-deps.patch +++ b/srcpkgs/python3-pytest/patches/man-remove-sphinx-deps.patch @@ -1,20 +1,20 @@ -Avoid adding four new packages that aren't necessary for the manual page. +Avoid adding new packages that aren't necessary for the manual page. --- a/doc/en/conf.py +++ b/doc/en/conf.py -@@ -65,16 +65,12 @@ - # Add any Sphinx extension module names here, as strings. They can be extensions - # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +@@ -27,16 +27,11 @@ + + root_doc = "index" extensions = [ -- "pallets_sphinx_themes", - "pygments_pytest", "sphinx.ext.autodoc", "sphinx.ext.autosummary", - "sphinx.ext.extlinks", "sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx.ext.viewcode", - "sphinx_removed_in", - "sphinxcontrib_trio", +- "sphinxcontrib.towncrier.ext", # provides `towncrier-draft-entries` directive +- "sphinx_issues", # implements `:issue:`, `:pr:` and other GH-related roles ] # Building PDF docs on readthedocs requires inkscape for svg to pdf diff --git a/srcpkgs/python3-pytest/template b/srcpkgs/python3-pytest/template index 0da2a9e5e32..5c8cd78726f 100644 --- a/srcpkgs/python3-pytest/template +++ b/srcpkgs/python3-pytest/template @@ -1,38 +1,52 @@ # Template file for 'python3-pytest' pkgname=python3-pytest -version=7.4.3 +version=8.3.1 revision=1 -build_style=python3-module -_common_deps="python3-attrs python3-iniconfig python3-py python3-pluggy" -hostmakedepends="python3-setuptools_scm python3-wheel python3-Sphinx ${_common_deps}" +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 python3-argcomplete python3-hypothesis python3-mock - python3-nose python3-requests python3-parsing python3-xmlschema" +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=d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5 +checksum=7e8e5c5abd6e93cb1cc151f23e57adc31fcf8cfd2a3ff2da63e23f732de35db6 alternatives=" pytest:pytest:/usr/bin/pytest3 pytest:py.test:/usr/bin/py.test3" -post_patch() { - # This test depends on tox, and/or egg-info - # merely check pytest and py.test were generated - rm testing/test_entry_points.py -} +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 + 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 \ - -k 'not test_color_yes and not test_code_highlight' + ${testjobs} ${make_check_args} } post_install() {