diff options
Diffstat (limited to 'dev-python/os-api-ref')
| -rw-r--r-- | dev-python/os-api-ref/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/os-api-ref/files/os-api-ref-3.0.0-python-3.12.patch | 18 | ||||
| -rw-r--r-- | dev-python/os-api-ref/files/os-api-ref-3.0.0-sphinx-7.2.0.patch | 39 | ||||
| -rw-r--r-- | dev-python/os-api-ref/os-api-ref-3.0.0.ebuild (renamed from dev-python/os-api-ref/os-api-ref-2.3.0.ebuild) | 18 |
4 files changed, 73 insertions, 4 deletions
diff --git a/dev-python/os-api-ref/Manifest b/dev-python/os-api-ref/Manifest index 04b388085db0..25aa0cb6d034 100644 --- a/dev-python/os-api-ref/Manifest +++ b/dev-python/os-api-ref/Manifest @@ -1 +1 @@ -DIST os-api-ref-2.3.0.tar.gz 92864 BLAKE2B 48d74f40a4b865520ec1b61235245f2571262c14c46f994d9b6655a33376a981732212ad4f38b894e495e6381302054eb455516de03b2d2f87662c8f29f4650d SHA512 e53063df90393c17e764e640c4ad5e1e6f1da7286ce9da6bdd460d54e2f831022a366c9cb711b95d8bfa872294309620f2d44cd4910277971ff2f2719c5d81eb +DIST os-api-ref-3.0.0.tar.gz 92919 BLAKE2B 8797fe76819148bad25d35039144b04d65c58ff9ddb235adb5e5eb39c073a938f1e17ed71ddfcb3c9ea53e98fa4876ccaef1963ec0b7b34f7d1a85c5829567f7 SHA512 ad7030cc91eacb482da19e42d94a81af4c3715f090966e33063d49693f567b0653e2e4a51d9526fe0e2a63480493f148582f96dc811b24e26534c9c05edf3897 diff --git a/dev-python/os-api-ref/files/os-api-ref-3.0.0-python-3.12.patch b/dev-python/os-api-ref/files/os-api-ref-3.0.0-python-3.12.patch new file mode 100644 index 000000000000..c0b7f66eb1e5 --- /dev/null +++ b/dev-python/os-api-ref/files/os-api-ref-3.0.0-python-3.12.patch @@ -0,0 +1,18 @@ +diff --git a/os_api_ref/tests/test_microversions.py b/os_api_ref/tests/test_microversions.py +index 8281442..c338c51 100644 +--- a/os_api_ref/tests/test_microversions.py ++++ b/os_api_ref/tests/test_microversions.py +@@ -44,11 +44,11 @@ class TestMicroversions(base.TestCase): + def test_rest_method(self): + """Test that min / max mv css class attributes are set""" + content = self.soup.find_all(class_='rp_min_ver_2_17') +- self.assertRegexpMatches( ++ self.assertRegex( + str(content[0]), + '^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"') + content = self.soup.find_all(class_='rp_max_ver_2_19') +- self.assertRegexpMatches( ++ self.assertRegex( + str(content[0]), + '^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"') + diff --git a/dev-python/os-api-ref/files/os-api-ref-3.0.0-sphinx-7.2.0.patch b/dev-python/os-api-ref/files/os-api-ref-3.0.0-sphinx-7.2.0.patch new file mode 100644 index 000000000000..8e398371bdd7 --- /dev/null +++ b/dev-python/os-api-ref/files/os-api-ref-3.0.0-sphinx-7.2.0.patch @@ -0,0 +1,39 @@ +diff --git a/os_api_ref/tests/base.py b/os_api_ref/tests/base.py +index 6e5e0dc..f5c2c1d 100644 +--- a/os_api_ref/tests/base.py ++++ b/os_api_ref/tests/base.py +@@ -16,10 +16,11 @@ + import os + + import fixtures ++import shutil + import tempfile + import testtools + +-from sphinx.testing.path import path ++from pathlib import Path + from sphinx.testing.util import SphinxTestApp + + +@@ -33,17 +34,16 @@ _TRUE_VALUES = ('True', 'true', '1', 'yes') + class with_app: + def __init__(self, **kwargs): + if 'srcdir' in kwargs: +- self.srcdir = path(kwargs['srcdir']) ++ self.srcdir = Path(kwargs['srcdir']) + self.sphinx_app_args = kwargs + + def __call__(self, f): + def newf(*args, **kwargs): + with tempfile.TemporaryDirectory() as tmpdirname: +- tmpdir = path(tmpdirname) +- tmproot = tmpdir / self.srcdir.basename() +- self.srcdir.copytree(tmproot) ++ tmpdir = Path(tmpdirname) ++ tmproot = tmpdir / self.srcdir.name ++ shutil.copytree(self.srcdir, tmproot) + self.sphinx_app_args['srcdir'] = tmproot +- self.builddir = tmproot.joinpath('_build') + + app = SphinxTestApp(freshenv=True, **self.sphinx_app_args) + diff --git a/dev-python/os-api-ref/os-api-ref-2.3.0.ebuild b/dev-python/os-api-ref/os-api-ref-3.0.0.ebuild index f62c99552dfe..4da89b72f24a 100644 --- a/dev-python/os-api-ref/os-api-ref-2.3.0.ebuild +++ b/dev-python/os-api-ref/os-api-ref-3.0.0.ebuild @@ -1,9 +1,15 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -EPYTEST_DESELECT=( os_api_ref/tests/test_microversions.py::TestMicroversions::test_parameters_table ) +EPYTEST_DESELECT=( + os_api_ref/tests/test_basic_example.py::TestBasicExample::test_parameters + os_api_ref/tests/test_basic_example.py::TestBasicExample::test_rest_response + os_api_ref/tests/test_microversions.py::TestMicroversions::test_parameters_table + os_api_ref/tests/test_warnings.py::TestWarnings::test_missing_field +) +DISTUTILS_USE_PEP517=setuptools PYTHON_COMPAT=( python3_{8,9,10,11,12} ) PYPI_NO_NORMALIZE=1 @@ -29,11 +35,17 @@ DEPEND="${RDEPEND}" BDEPEND=" test? ( >=dev-python/beautifulsoup4-4.6.0[${PYTHON_USEDEP}] - >=dev-python/sphinx-testing-1.0.1[${PYTHON_USEDEP}] + dev-python/fixtures[${PYTHON_USEDEP}] + >=dev-python/sphinx-4.0.0[${PYTHON_USEDEP}] >=dev-python/subunit-1.0.0[${PYTHON_USEDEP}] >=dev-python/testtools-2.2.0[${PYTHON_USEDEP}] ) " +PATCHES=( + "${FILESDIR}/${P}-python-3.12.patch" + "${FILESDIR}/${P}-sphinx-7.2.0.patch" +) + distutils_enable_tests pytest distutils_enable_sphinx doc/source ">=dev-python/openstackdocstheme-2.2.1" |
