From c94b34ffcb910d0f1f72280c768082a2dcc5b76b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Thu, 19 Oct 2023 04:31:22 +0200 Subject: [PATCH] Sync from SUSE:ALP:Source:Standard:1.0 python-sphinxcontrib-apidoc revision 3510b5db83996310457ab7b9f112e7fd --- .gitattributes | 23 ++++++++ _multibuild | 3 + python-sphinxcontrib-apidoc.changes | 38 +++++++++++++ python-sphinxcontrib-apidoc.spec | 85 +++++++++++++++++++++++++++++ sphinx72.patch | 83 ++++++++++++++++++++++++++++ sphinxcontrib-apidoc-0.3.0.tar.gz | 3 + 6 files changed, 235 insertions(+) create mode 100644 .gitattributes create mode 100644 _multibuild create mode 100644 python-sphinxcontrib-apidoc.changes create mode 100644 python-sphinxcontrib-apidoc.spec create mode 100644 sphinx72.patch create mode 100644 sphinxcontrib-apidoc-0.3.0.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..83bd4e9 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-sphinxcontrib-apidoc.changes b/python-sphinxcontrib-apidoc.changes new file mode 100644 index 0000000..ea1a3e3 --- /dev/null +++ b/python-sphinxcontrib-apidoc.changes @@ -0,0 +1,38 @@ +------------------------------------------------------------------- +Wed Aug 30 11:27:32 UTC 2023 - Markéta Machová + +- add sphinx72.patch to fix tests, sent upstream + +------------------------------------------------------------------- +Fri Apr 21 12:36:46 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:45:05 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Fri Apr 26 12:46:35 UTC 2019 - Marketa Calabkova + +- update to version 0.3.0 + * Ensure '--tocfile' isn't configured for Sphinx < 1.8 + * Support more configuration options + * fix the dist name used to get the version after installation +- Launching tests using multibuild. It just did not work without it. + +------------------------------------------------------------------- +Fri Dec 7 20:49:39 UTC 2018 - Matej Cepl + +- Remove wrong BR on python-sphinxcontrib + +------------------------------------------------------------------- +Tue Dec 4 12:54:37 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Mon Apr 16 08:51:13 UTC 2018 - tbechtold@suse.com + +- Initial packaging (version 0.2.1) diff --git a/python-sphinxcontrib-apidoc.spec b/python-sphinxcontrib-apidoc.spec new file mode 100644 index 0000000..ea36ec4 --- /dev/null +++ b/python-sphinxcontrib-apidoc.spec @@ -0,0 +1,85 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +%{?sle15_python_module_pythons} +Name: python-sphinxcontrib-apidoc%{psuffix} +Version: 0.3.0 +Release: 0 +Summary: A Sphinx extension for running 'sphinx-apidoc' on each build +License: BSD-2-Clause +Group: Development/Languages/Python +URL: http://www.sphinx-doc.org/ +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 setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-Sphinx >= 1.6.0 +Requires: python-pbr +BuildArch: noarch +# SECTION test requirements +%if %{with test} +BuildRequires: %{python_module pytest >= 3.0} +BuildRequires: %{python_module sphinxcontrib-apidoc = %{version}} +%endif +# /SECTION +%python_subpackages + +%description +*sphinx-apidoc* is a tool for automatic generation of Sphinx sources that, +using the `autodoc `_ extension, documents a whole package in +the style of other automatic API documentation tools. *sphinx-apidoc* does not +actually build documentation - rather it simply generates it. As a result, it +must be run before *sphinx-build*. + +%prep +%autosetup -p1 -n sphinxcontrib-apidoc-%{version} + +%build +%python_build + +%install +%if !%{with test} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif + +%if %{with test} +%check +%pytest tests +%endif + +%if !%{with test} +%files %{python_files} +%license LICENSE +%doc AUTHORS ChangeLog README.rst +%{python_sitelib}/* +%endif + +%changelog diff --git a/sphinx72.patch b/sphinx72.patch new file mode 100644 index 0000000..0a58829 --- /dev/null +++ b/sphinx72.patch @@ -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', + ]: diff --git a/sphinxcontrib-apidoc-0.3.0.tar.gz b/sphinxcontrib-apidoc-0.3.0.tar.gz new file mode 100644 index 0000000..ef8ba8f --- /dev/null +++ b/sphinxcontrib-apidoc-0.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:729bf592cf7b7dd57c4c05794f732dc026127275d785c2a5494521fdde773fb9 +size 15396