Compare commits

..

No commits in common. "3bf51b9667801ce94d3a4a616c3337e410f8dd06" and "6c66a851ebe3fd95f02a81cfa309fbd087042ae1" have entirely different histories.

8 changed files with 290 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# Copyright 2021-2024 Gentoo Authors
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@ -17,6 +17,9 @@ RESTRICT="!test? ( test )"
RDEPEND="dev-python/fields[${PYTHON_USEDEP}]"
DEPEND="
doc? (
dev-python/sphinx-py3doc-enhanced-theme[${PYTHON_USEDEP}]
)
test? (
${RDEPEND}
dev-python/process-tests[${PYTHON_USEDEP}]
@ -24,5 +27,5 @@ DEPEND="
)
"
distutils_enable_sphinx docs dev-python/sphinx-py3doc-enhanced-theme
distutils_enable_tests pytest
distutils_enable_sphinx docs

View File

@ -0,0 +1 @@
DIST sphinx-py3doc-enhanced-theme-2.4.0.tar.gz 42093 BLAKE2B 020deec0d589d8052f2cce6faaeb8764b596a042584a0988dbcd73f0dc11c647db35b1b91fac63413ad211025fb98bbcc76a5bb2caa1cece56b907e021a0c20d SHA512 3ba362bf9179bdd69cd50fe7759cecd1ce89c7c5e7cd5f50d6f92af9835369436fc34b5dcc39295197828481041d30cf59dea3a929d232abd6b62e9e066b60f2

View File

@ -0,0 +1,48 @@
From 56f88757c722d479fc8978f8a8be8469124970e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
Date: Tue, 4 May 2021 16:18:21 +0300
Subject: [PATCH] Allow missing env var. Closes #14.
---
tests/conf.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/conf.py b/tests/conf.py
index 50baef3..2b251bb 100644
--- a/tests/conf.py
+++ b/tests/conf.py
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
import os
+import sphinx_py3doc_enhanced_theme
extensions = [
'sphinx.ext.autodoc',
@@ -24,13 +25,13 @@ year = '2014-2015'
author = 'Ionel Cristian Mărieș'
copyright = '{0}, {1}'.format(year, author)
version = release = '2.4.0'
-import sphinx_py3doc_enhanced_theme
+
html_theme = "sphinx_py3doc_enhanced_theme"
html_theme_path = [sphinx_py3doc_enhanced_theme.get_html_theme_path()]
html_theme_options = {
'githuburl': 'https://github.com/ionelmc/sphinx-py3doc-enhanced-theme/',
}
-if os.environ['EXTRASTYLING'] == 'false':
+if os.environ.get('EXTRASTYLING', 'false') == 'false':
html_theme_options.update({
'bodyfont': '"Lucida Grande",Arial,sans-serif',
'headfont': '"Lucida Grande",Arial,sans-serif',
@@ -47,6 +48,6 @@ html_use_smartypants = True
html_last_updated_fmt = '%b %d, %Y'
html_split_index = True
html_sidebars = {
- '**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
+ '**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'],
}
html_short_title = '%s-%s' % (project, version)
--
2.26.3

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

@ -0,0 +1,75 @@
From a013b01a0bb99807b016f907b07564bf32925fda Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= <contact@ionelmc.ro>
Date: Tue, 4 May 2021 15:57:39 +0300
Subject: [PATCH] Update skel.
---
setup.cfg | 40 ++++++++++++++++++----------------------
1 file changed, 18 insertions(+), 22 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index 33f1bea..65215db 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,39 +1,35 @@
[bdist_wheel]
universal = 1
-[aliases]
-release = register clean --all sdist bdist_wheel
-
[flake8]
max-line-length = 140
-exclude = tests/*,*/migrations/*,*/south_migrations/*
+exclude = .tox,.eggs,ci/templates,build,dist
-[pytest]
+[tool:pytest]
+# If a pytest section is found in one of the possible config files
+# (pytest.ini, tox.ini or setup.cfg), then pytest will not look for any others,
+# so if you add a pytest config section elsewhere,
+# you will need to delete this section from setup.cfg.
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
+ -ra
+ --strict-markers
--doctest-modules
--doctest-glob=\*.rst
--tb=short
+testpaths =
+ tests
-[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
\ No newline at end of file
+[tool: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
+skip = .tox,.eggs,ci/templates,build,dist
--
2.26.3

View File

@ -0,0 +1,67 @@
--- 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

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>parona@protonmail.com</email>
<name>Alfred Wingate</name>
</maintainer>
<upstream>
<remote-id type="github">ionelmc/sphinx-py3doc-enhanced-theme</remote-id>
<remote-id type="pypi">sphinx-py3doc-enhanced-theme</remote-id>
</upstream>
</pkgmetadata>

View File

@ -0,0 +1,26 @@
# Copyright 2021-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYPI_NO_NORMALIZE=y
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{8..12} )
inherit distutils-r1 pypi
DESCRIPTION="A theme based on the theme of https://docs.python.org/3/."
HOMEPAGE="https://github.com/ionelmc/sphinx-py3doc-enhanced-theme"
LICENSE="BSD-2"
SLOT="0"
KEYWORDS="~amd64"
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"
)
DOCS=( "README.rst" )