Accepting request 1108094 from home:mcalabkova:branches:devel:languages:python
- add sphinx72.patch to fix tests, sent upstream OBS-URL: https://build.opensuse.org/request/show/1108094 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sphinxcontrib-apidoc?expand=0&rev=12
This commit is contained in:
parent
0940b3f97c
commit
e16bf15547
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Aug 30 11:27:32 UTC 2023 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- add sphinx72.patch to fix tests, sent upstream
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 21 12:36:46 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Apr 21 12:36:46 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ License: BSD-2-Clause
|
|||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://www.sphinx-doc.org/
|
URL: http://www.sphinx-doc.org/
|
||||||
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-apidoc/sphinxcontrib-apidoc-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-apidoc/sphinxcontrib-apidoc-%{version}.tar.gz
|
||||||
|
#PATCH-FIX-UPSTREAM https://github.com/sphinx-contrib/apidoc/pull/18 fix tests with Sphinx 7.2
|
||||||
|
Patch: sphinx72.patch
|
||||||
BuildRequires: %{python_module pbr >= 4.0}
|
BuildRequires: %{python_module pbr >= 4.0}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -57,7 +59,7 @@ actually build documentation - rather it simply generates it. As a result, it
|
|||||||
must be run before *sphinx-build*.
|
must be run before *sphinx-build*.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n sphinxcontrib-apidoc-%{version}
|
%autosetup -p1 -n sphinxcontrib-apidoc-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
83
sphinx72.patch
Normal file
83
sphinx72.patch
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
Index: sphinxcontrib-apidoc-0.3.0/tests/conftest.py
|
||||||
|
===================================================================
|
||||||
|
--- sphinxcontrib-apidoc-0.3.0.orig/tests/conftest.py
|
||||||
|
+++ sphinxcontrib-apidoc-0.3.0/tests/conftest.py
|
||||||
|
@@ -10,7 +10,7 @@ import os
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
-from sphinx.testing.path import path
|
||||||
|
+from pathlib import Path
|
||||||
|
|
||||||
|
pytest_plugins = 'sphinx.testing.fixtures'
|
||||||
|
|
||||||
|
@@ -19,11 +19,10 @@ collect_ignore = ['roots']
|
||||||
|
|
||||||
|
@pytest.fixture(scope='session')
|
||||||
|
def sphinx_test_tempdir():
|
||||||
|
- return path(
|
||||||
|
+ return Path(
|
||||||
|
os.environ.get('SPHINX_TEST_TEMPDIR',
|
||||||
|
- tempfile.mkdtemp(prefix='apidoc-'))).abspath()
|
||||||
|
-
|
||||||
|
+ tempfile.mkdtemp(prefix='apidoc-'))).resolve()
|
||||||
|
|
||||||
|
@pytest.fixture(scope='session')
|
||||||
|
def rootdir():
|
||||||
|
- return path(os.path.dirname(__file__) or '.').abspath() / 'roots'
|
||||||
|
+ return Path(os.path.dirname(__file__) or '.').resolve() / 'roots'
|
||||||
|
Index: sphinxcontrib-apidoc-0.3.0/tests/test_ext.py
|
||||||
|
===================================================================
|
||||||
|
--- sphinxcontrib-apidoc-0.3.0.orig/tests/test_ext.py
|
||||||
|
+++ sphinxcontrib-apidoc-0.3.0/tests/test_ext.py
|
||||||
|
@@ -19,12 +19,12 @@ def test_basics(app, status, warning):
|
||||||
|
logging.setup(app, status, warning)
|
||||||
|
app.builder.build_all()
|
||||||
|
|
||||||
|
- assert (app.srcdir / 'api').isdir()
|
||||||
|
+ assert (app.srcdir / 'api').is_dir()
|
||||||
|
assert (app.srcdir / 'api' / 'modules.rst').exists()
|
||||||
|
assert (app.srcdir / 'api' / 'apidoc_dummy_module.rst').exists()
|
||||||
|
assert not (app.srcdir / 'api' / 'conf.rst').exists()
|
||||||
|
|
||||||
|
- assert (app.outdir / 'api').isdir()
|
||||||
|
+ assert (app.outdir / 'api').is_dir()
|
||||||
|
assert (app.outdir / 'api' / 'modules.html').exists()
|
||||||
|
assert (app.outdir / 'api' / 'apidoc_dummy_module.html').exists()
|
||||||
|
assert not (app.outdir / 'api' / 'conf.html').exists()
|
||||||
|
@@ -40,7 +40,7 @@ def test_advanced(app, status, warning):
|
||||||
|
logging.setup(app, status, warning)
|
||||||
|
app.builder.build_all()
|
||||||
|
|
||||||
|
- assert (app.srcdir / 'api').isdir()
|
||||||
|
+ assert (app.srcdir / 'api').is_dir()
|
||||||
|
assert (app.srcdir / 'api' / 'custom.rst').exists()
|
||||||
|
for module in [
|
||||||
|
'apidoc_dummy_module.rst',
|
||||||
|
@@ -58,7 +58,7 @@ def test_advanced(app, status, warning):
|
||||||
|
# The 'Module contents' header isn't present if '--module-first' used
|
||||||
|
assert 'Module contents' not in package_doc
|
||||||
|
|
||||||
|
- assert (app.outdir / 'api').isdir()
|
||||||
|
+ assert (app.outdir / 'api').is_dir()
|
||||||
|
assert (app.outdir / 'api' / 'custom.html').exists()
|
||||||
|
for module in [
|
||||||
|
'apidoc_dummy_module.html',
|
||||||
|
@@ -79,7 +79,7 @@ def test_advanced_negative(app, status,
|
||||||
|
logging.setup(app, status, warning)
|
||||||
|
app.builder.build_all()
|
||||||
|
|
||||||
|
- assert (app.srcdir / 'api').isdir()
|
||||||
|
+ assert (app.srcdir / 'api').is_dir()
|
||||||
|
for module in [
|
||||||
|
'apidoc_dummy_module.rst',
|
||||||
|
]:
|
||||||
|
@@ -94,7 +94,7 @@ def test_advanced_negative(app, status,
|
||||||
|
# The 'Module contents' header is present if '--module-first' isn't used
|
||||||
|
assert 'Module contents' in package_doc
|
||||||
|
|
||||||
|
- assert (app.outdir / 'api').isdir()
|
||||||
|
+ assert (app.outdir / 'api').is_dir()
|
||||||
|
for module in [
|
||||||
|
'apidoc_dummy_module.html',
|
||||||
|
]:
|
Loading…
Reference in New Issue
Block a user