From 0de51dc05e9e29df47a3a8673d13072303c03f7d Mon Sep 17 00:00:00 2001 From: Alfred Wingate Date: Tue, 29 Jun 2021 12:59:40 +0300 Subject: [PATCH] dev-python/sphinx-py3doc-enhanced-theme: bump EAPI and PYTHON_COMPAT, enable tests Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Alfred Wingate --- .../files/Fix-goofy-doctest.patch | 56 ++++++++++++++++ .../files/test.patch | 67 ------------------- .../sphinx-py3doc-enhanced-theme-2.4.0.ebuild | 7 +- 3 files changed, 59 insertions(+), 71 deletions(-) create mode 100644 dev-python/sphinx-py3doc-enhanced-theme/files/Fix-goofy-doctest.patch delete mode 100644 dev-python/sphinx-py3doc-enhanced-theme/files/test.patch diff --git a/dev-python/sphinx-py3doc-enhanced-theme/files/Fix-goofy-doctest.patch b/dev-python/sphinx-py3doc-enhanced-theme/files/Fix-goofy-doctest.patch new file mode 100644 index 0000000..565a26f --- /dev/null +++ b/dev-python/sphinx-py3doc-enhanced-theme/files/Fix-goofy-doctest.patch @@ -0,0 +1,56 @@ +From 0183feb1bf833732233dcfd350db2beb26ed3f79 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= +Date: Sun, 6 Jun 2021 15:43:05 +0300 +Subject: [PATCH] Fix goofy doctest. Ref #15. + +--- + tests/reference/foobar.rst | 13 +++++++------ + tox.ini | 2 ++ + 2 files changed, 9 insertions(+), 6 deletions(-) + +diff --git a/tests/reference/foobar.rst b/tests/reference/foobar.rst +index 4395458..db641b5 100644 +--- a/tests/reference/foobar.rst ++++ b/tests/reference/foobar.rst +@@ -8,13 +8,14 @@ + .. sourcecode:: pycon + + >>> def fib(n): +- >>> a, b = 0, 1 +- >>> while a < n: +- >>> print(a, end=' ') +- >>> a, b = b, a+b +- >>> print() ++ ... a, b = 0, 1 ++ ... while a < n: ++ ... print('', a, end='') ++ ... a, b = b, a+b ++ ... print() ++ + >>> fib(1000) +- 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 ++ 0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 + + .. sourcecode:: python + +diff --git a/tox.ini b/tox.ini +index a865487..b0d333f 100644 +--- a/tox.ini ++++ b/tox.ini +@@ -18,11 +18,13 @@ passenv = + deps = + sphinx + ghp-import2 ++ pytest + commands = + clean: python -c 'import shutil; shutil.rmtree("dist", True)' + default: sphinx-build {posargs:-E} -b html tests dist/default + bare: sphinx-build {posargs:-E} -b html tests dist/bare + import: ghp-import -n -p -m "Update gh-pages." dist ++ test: pytest -ra + usedevelop = true + + [testenv:check] +-- +2.31.1 + diff --git a/dev-python/sphinx-py3doc-enhanced-theme/files/test.patch b/dev-python/sphinx-py3doc-enhanced-theme/files/test.patch deleted file mode 100644 index 7a3686a..0000000 --- a/dev-python/sphinx-py3doc-enhanced-theme/files/test.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/setup.cfg 2016-12-17 03:51:53.000000000 +0200 -+++ b/setup.cfg 2021-05-21 18:12:08.900317387 +0300 -@@ -9,37 +9,31 @@ - exclude = tests/*,*/migrations/*,*/south_migrations/* - - [pytest] --norecursedirs = -- .git -- .tox -- .env -- dist -- build -- south_migrations -- migrations --python_files = -- test_*.py -- *_test.py -- tests.py --addopts = -- -rxEfs -- --strict -- --ignore=docs/conf.py -- --ignore=setup.py -- --ignore=ci -- --doctest-modules -- --doctest-glob=\*.rst -- --tb=short -+norecursedirs = -+ .git -+ .tox -+ .env -+ dist -+ build -+ south_migrations -+ migrations -+python_files = -+ test_*.py -+ *_test.py -+ tests.py -+addopts = -+ -rxEfs -+ --strict -+ --ignore=docs/conf.py -+ --ignore=setup.py -+ --ignore=ci -+ --doctest-modules -+ --doctest-glob=\*.rst -+ --tb=short - - [isort] --force_single_line = True --line_length = 120 --known_first_party = sphinx_py3doc_enhanced_theme --default_section = THIRDPARTY --forced_separate = test_sphinx_py3doc_enhanced_theme -- --[egg_info] --tag_build = --tag_date = 0 --tag_svn_revision = 0 -- -+force_single_line=True -+line_length=120 -+known_first_party=sphinx_py3doc_enhanced_theme -+default_section=THIRDPARTY -+forced_separate=test_sphinx_py3doc_enhanced_theme -\ No newline at end of file diff --git a/dev-python/sphinx-py3doc-enhanced-theme/sphinx-py3doc-enhanced-theme-2.4.0.ebuild b/dev-python/sphinx-py3doc-enhanced-theme/sphinx-py3doc-enhanced-theme-2.4.0.ebuild index d689f77..4750036 100644 --- a/dev-python/sphinx-py3doc-enhanced-theme/sphinx-py3doc-enhanced-theme-2.4.0.ebuild +++ b/dev-python/sphinx-py3doc-enhanced-theme/sphinx-py3doc-enhanced-theme-2.4.0.ebuild @@ -1,9 +1,9 @@ # Copyright 2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -PYTHON_COMPAT=( python3_{8..9} ) +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 DESCRIPTION="A theme based on the theme of https://docs.python.org/3/." @@ -13,13 +13,12 @@ SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" LICENSE="BSD-2" SLOT="0" KEYWORDS="~amd64" -# TODO: figure out how to fix tests -RESTRICT="test" distutils_enable_tests pytest PATCHES=( "${FILESDIR}/Allow-missing-env-var.patch" + "${FILESDIR}/Fix-goofy-doctest.patch" "${FILESDIR}/undo-pypi-modification-to-setupcfg.patch" "${FILESDIR}/backport-for-setupcfg.patch" )