From b9127c0f6fc9167fafac2fb51580fd51be92a3e5 Mon Sep 17 00:00:00 2001 From: Michal Vasilek Date: Sun, 18 Jul 2021 12:05:35 +0200 Subject: [PATCH] python3-pytest: install manpage --- .../patches/man-remove-sphinx-deps.patch | 19 +++++++++++++++++++ srcpkgs/python3-pytest/template | 9 +++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/python3-pytest/patches/man-remove-sphinx-deps.patch diff --git a/srcpkgs/python3-pytest/patches/man-remove-sphinx-deps.patch b/srcpkgs/python3-pytest/patches/man-remove-sphinx-deps.patch new file mode 100644 index 000000000000..f3345d6e0a35 --- /dev/null +++ b/srcpkgs/python3-pytest/patches/man-remove-sphinx-deps.patch @@ -0,0 +1,19 @@ +we don't need all the dependencies for generating the manpage, avoids needing 4 new packages +--- a/doc/en/conf.py ++++ b/doc/en/conf.py +@@ -45,15 +45,11 @@ + # Add any Sphinx extension module names here, as strings. They can be extensions + # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + extensions = [ +- "pallets_sphinx_themes", +- "pygments_pytest", + "sphinx.ext.autodoc", + "sphinx.ext.autosummary", + "sphinx.ext.intersphinx", + "sphinx.ext.todo", + "sphinx.ext.viewcode", +- "sphinx_removed_in", +- "sphinxcontrib_trio", + ] + + # Add any paths that contain templates here, relative to this directory. diff --git a/srcpkgs/python3-pytest/template b/srcpkgs/python3-pytest/template index 56ac4b4493af..5ea8912596ea 100644 --- a/srcpkgs/python3-pytest/template +++ b/srcpkgs/python3-pytest/template @@ -1,10 +1,10 @@ # Template file for 'python3-pytest' pkgname=python3-pytest version=6.2.4 -revision=1 +revision=2 wrksrc="pytest-${version}" build_style=python3-module -hostmakedepends="python3-setuptools_scm python3-toml" +hostmakedepends="python3-setuptools_scm python3-toml python3-Sphinx" depends="python3-py python3-packaging python3-attrs python3-more-itertools python3-atomicwrites python3-pluggy python3-wcwidth python3-setuptools python3-iniconfig python3-toml" @@ -32,6 +32,11 @@ do_check() { -k 'not test_color_yes and not test_code_highlight' } +post_build() { + PYTHONPATH=$(pwd)/build/lib/ make -C doc/en man + vman doc/en/_build/man/pytest.1 +} + post_install() { mv ${DESTDIR}/usr/bin/pytest ${DESTDIR}/usr/bin/pytest3 mv ${DESTDIR}/usr/bin/py.test ${DESTDIR}/usr/bin/py.test3