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 <parona@protonmail.com>
This commit is contained in:
Alfred Wingate 2021-06-29 12:59:40 +03:00
parent de1f5b9a6a
commit 0de51dc05e
No known key found for this signature in database
GPG Key ID: A12750536B5E7010
3 changed files with 59 additions and 71 deletions

View File

@ -0,0 +1,56 @@
From 0183feb1bf833732233dcfd350db2beb26ed3f79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
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

View File

@ -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

View File

@ -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"
)