summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/manuel')
-rw-r--r--dev-python/manuel/Manifest2
-rw-r--r--dev-python/manuel/files/manuel-1.8.0-rm_zope_test.patch120
-rw-r--r--dev-python/manuel/manuel-1.12.4_p20231129.ebuild48
-rw-r--r--dev-python/manuel/manuel-1.9.0.ebuild31
-rw-r--r--dev-python/manuel/metadata.xml19
5 files changed, 59 insertions, 161 deletions
diff --git a/dev-python/manuel/Manifest b/dev-python/manuel/Manifest
index 8ab00f097af3..288e3f7d0e6c 100644
--- a/dev-python/manuel/Manifest
+++ b/dev-python/manuel/Manifest
@@ -1 +1 @@
-DIST manuel-1.9.0.tar.gz 39640 BLAKE2B 1b699b92816297fee13a65ed2c4fc9ee3683f8e47e7fbf06178c97167ae29cabcedc48edec48b053f725889b39111b3634f0305ac651b5674292d046434fd134 SHA512 519b0fd1bd7ef3414dec69f721a6f1265603d28e3b61681acf46e9fba6fdc66efb6c0a82d814af8348bb7c07c3c4c299ae94ea7d6415436592ac37fccaacf18a
+DIST manuel-3f4d94d2ace3bdab4acad6896c93f5c96d6bee92.tar.gz 39774 BLAKE2B 7be5bad5ee39358e1b0229c02c86c9492cae09684d8a942b9f5dcf0afe31037f635295019306d404a1fb0b81e40bb523d194cc499a89b32600f1a330ddaf4d2d SHA512 f96fe6c9438b00d7562d64ead32ef84dcc4746281f066e4e7c175b1b274691ccd615c31e1d26fdc25a67e67d03f28b52182652921ab2c9ff365f59aaa475adaf
diff --git a/dev-python/manuel/files/manuel-1.8.0-rm_zope_test.patch b/dev-python/manuel/files/manuel-1.8.0-rm_zope_test.patch
deleted file mode 100644
index d1b61cc678ab..000000000000
--- a/dev-python/manuel/files/manuel-1.8.0-rm_zope_test.patch
+++ /dev/null
@@ -1,120 +0,0 @@
- setup.py | 6 ------
- src/manuel/index.txt | 26 ++++++++------------------
- src/manuel/tests.py | 13 +++++++++----
- 3 files changed, 17 insertions(+), 28 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 4561779..b6730c8 100644
---- a/setup.py
-+++ b/setup.py
-@@ -20,8 +20,6 @@ with open('README.rst') as readme:
- with open('CHANGES.rst') as changes:
- long_description = readme.read() + '\n\n' + changes.read()
-
--tests_require = ['zope.testing']
--
- setup(
- name='manuel',
- version='1.8.0',
-@@ -44,10 +42,6 @@ setup(
- 'License :: OSI Approved :: Apache Software License',
- ],
- license='Apache Software License, Version 2.0',
-- extras_require={
-- 'tests': tests_require,
-- },
-- tests_require=tests_require,
- test_suite='manuel.tests.test_suite',
- install_requires=[
- 'setuptools',
-diff --git a/src/manuel/index.txt b/src/manuel/index.txt
-index c1d85f3..a315317 100644
---- a/src/manuel/index.txt
-+++ b/src/manuel/index.txt
-@@ -166,16 +166,16 @@ can pass in your own class to `TestSuite`.
-
- .. code-block:: python
-
-- import os.path
-- import manuel.testing
-+ import os.path
-+ import manuel.testing
-
-- class StripDirsTestCase(manuel.testing.TestCase):
-- def shortDescription(self):
-- return os.path.basename(str(self))
-- suite = manuel.testing.TestSuite(
-- m, path_to_test, TestCase=StripDirsTestCase)
-+ class StripDirsTestCase(manuel.testing.TestCase):
-+ def shortDescription(self):
-+ return os.path.basename(str(self))
-+ suite = manuel.testing.TestSuite(
-+ m, path_to_test, TestCase=StripDirsTestCase)
-
-- >>> list(suite)[0].shortDescription()
-+ list(suite)[0].shortDescription()
- 'bugs.txt'
-
-
-@@ -236,16 +236,6 @@ checkers <http://docs.python.org/library/doctest.html#outputchecker-objects>`_
- smoothes over the differences between CPython's and PyPy's NameError
- messages:
-
--.. code-block:: python
--
-- import re
-- import zope.testing.renormalizing
-- checker = zope.testing.renormalizing.RENormalizing([
-- (re.compile(r"NameError: global name '([a-zA-Z0-9_]+)' is not defined"),
-- r"NameError: name '\1' is not defined"),
-- ])
--
--
- .. reset-globs
- .. _capture:
-
-diff --git a/src/manuel/tests.py b/src/manuel/tests.py
-index 07723a6..b1a3a76 100644
---- a/src/manuel/tests.py
-+++ b/src/manuel/tests.py
-@@ -11,11 +11,12 @@ import manuel.testing
- import os.path
- import re
- import unittest
--import zope.testing.renormalizing
-
- here = os.path.dirname(os.path.abspath(__file__))
-
--checker = zope.testing.renormalizing.RENormalizing([
-+try:
-+ import zope.testing.renormalizing
-+ checker = zope.testing.renormalizing.RENormalizing([
- (re.compile(r"<unittest\.result\.TestResult"), '<unittest.TestResult'),
- # PyPy spells some error messages differently
- (re.compile(r"NameError: global name '([a-zA-Z0-9_]+)' is not defined"),
-@@ -25,7 +26,9 @@ checker = zope.testing.renormalizing.RENormalizing([
- r"<\1 object"),
- (re.compile(r"<SRE_Match object"),
- r"<_sre.SRE_Match object"),
--])
-+ ])
-+except ImportError:
-+ pass
-
-
- def turtle_on_the_bottom_test():
-@@ -59,7 +62,6 @@ def test_suite():
- optionflags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
-
- m = manuel.ignore.Manuel()
-- m += manuel.doctest.Manuel(optionflags=optionflags, checker=checker)
- m += manuel.codeblock.Manuel()
- m += manuel.capture.Manuel()
- m += manuel.testcase.SectionManuel()
-@@ -73,3 +75,6 @@ def test_suite():
- suite,
- doctest.DocTestSuite(),
- ))
-+
-+if __name__ == '__main__':
-+ unittest.TextTestRunner().run(test_suite())
diff --git a/dev-python/manuel/manuel-1.12.4_p20231129.ebuild b/dev-python/manuel/manuel-1.12.4_p20231129.ebuild
new file mode 100644
index 000000000000..45f5edbe154c
--- /dev/null
+++ b/dev-python/manuel/manuel-1.12.4_p20231129.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+
+inherit distutils-r1
+
+EGIT_COMMIT=3f4d94d2ace3bdab4acad6896c93f5c96d6bee92
+MY_P=${PN}-${EGIT_COMMIT}
+
+DESCRIPTION="Lets you mix and match traditional doctests with custom test syntax"
+HOMEPAGE="
+ https://github.com/benji-york/manuel/
+ https://pypi.org/project/manuel/
+"
+SRC_URI="
+ https://github.com/benji-york/manuel/archive/${EGIT_COMMIT}.tar.gz
+ -> ${MY_P}.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="amd64 ~arm arm64 ~ppc64 ~riscv x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ test? (
+ dev-python/zope-testing[${PYTHON_USEDEP}]
+ )
+"
+
+src_prepare() {
+ # unused rdep
+ sed -e "/'setuptools'/d" -i setup.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ # tests are installed to site-packages but dependent data files
+ # are not, so run them from src instead
+ local -x PYTHONPATH=src
+ "${EPYTHON}" -m unittest -vv manuel.tests.test_suite || die
+}
diff --git a/dev-python/manuel/manuel-1.9.0.ebuild b/dev-python/manuel/manuel-1.9.0.ebuild
deleted file mode 100644
index 0516848a17be..000000000000
--- a/dev-python/manuel/manuel-1.9.0.ebuild
+++ /dev/null
@@ -1,31 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python3_{6,7} )
-
-inherit distutils-r1
-
-DESCRIPTION="Manuel lets you build tested documentation"
-HOMEPAGE="https://github.com/benji-york/manuel/ https://pypi.org/project/manuel/"
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-RDEPEND="
- dev-python/six[${PYTHON_USEDEP}]"
-
-# Required to run tests
-DISTUTILS_IN_SOURCE_BUILD=1
-
-#DOCS=( CHANGES.rst )
-
-#PATCHES=( "${FILESDIR}"/${P}-rm_zope_test.patch )
-
-#python_test() {
-# PYTHONPATH=src/:${PYTHONPATH} esetup.py test
-#}
diff --git a/dev-python/manuel/metadata.xml b/dev-python/manuel/metadata.xml
index cfc835588bcb..f62e8a58f417 100644
--- a/dev-python/manuel/metadata.xml
+++ b/dev-python/manuel/metadata.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>python@gentoo.org</email>
- <name>Python</name>
- </maintainer>
- <upstream>
- <remote-id type="github">benji-york/manuel</remote-id>
- <remote-id type="pypi">manuel</remote-id>
- </upstream>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches/>
+ <upstream>
+ <remote-id type="github">benji-york/manuel</remote-id>
+ <remote-id type="pypi">manuel</remote-id>
+ </upstream>
</pkgmetadata>