From f4a7dd0cc905c8299b19e0b630b643a5c7ddfc8e Mon Sep 17 00:00:00 2001 From: tigro Date: Sat, 4 Jan 2025 21:54:59 +0300 Subject: [PATCH] import python-sphinxcontrib-programoutput-0.17-20.el10 --- .gitignore | 1 + .python-sphinxcontrib-programoutput.metadata | 1 + ...14d2e0806dda1902bd452595beaa951aec36.patch | 101 +++++++ SPECS/python-sphinxcontrib-programoutput.spec | 253 ++++++++++++++++++ 4 files changed, 356 insertions(+) create mode 100644 .gitignore create mode 100644 .python-sphinxcontrib-programoutput.metadata create mode 100644 SOURCES/bd1c14d2e0806dda1902bd452595beaa951aec36.patch create mode 100644 SPECS/python-sphinxcontrib-programoutput.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24be06a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/sphinxcontrib-programoutput-0.17.tar.gz diff --git a/.python-sphinxcontrib-programoutput.metadata b/.python-sphinxcontrib-programoutput.metadata new file mode 100644 index 0000000..fa5ea97 --- /dev/null +++ b/.python-sphinxcontrib-programoutput.metadata @@ -0,0 +1 @@ +6b14f3d6185a4ed9d8ec48c1c445347b43b39d71 SOURCES/sphinxcontrib-programoutput-0.17.tar.gz diff --git a/SOURCES/bd1c14d2e0806dda1902bd452595beaa951aec36.patch b/SOURCES/bd1c14d2e0806dda1902bd452595beaa951aec36.patch new file mode 100644 index 0000000..954dfc2 --- /dev/null +++ b/SOURCES/bd1c14d2e0806dda1902bd452595beaa951aec36.patch @@ -0,0 +1,101 @@ +From bd1c14d2e0806dda1902bd452595beaa951aec36 Mon Sep 17 00:00:00 2001 +From: Jason Madden +Date: Tue, 3 Aug 2021 08:22:15 -0500 +Subject: [PATCH] Fix warning from Sphinx 4.1.2. + +The extlink template needs to include the % formatting character. +--- + CHANGES.rst | 23 ++++++++--------------- + doc/conf.py | 4 ++-- + 2 files changed, 10 insertions(+), 17 deletions(-) + +diff --git a/CHANGES.rst b/CHANGES.rst +index bf67caa..e8e3be1 100644 +--- a/CHANGES.rst ++++ b/CHANGES.rst +@@ -17,15 +17,14 @@ + + - Include program output and current working directory in the warning + logged when a program returns an unexpected return code. Suggested +- by Sorin Sbarnea. See `issue 50 +- `_. ++ by Sorin Sbarnea. See :issue:`50`. ++ + + + 0.16 (2020-03-23) + ================= + +-- Add ``name`` and ``caption`` options. Added in +- `PR 41 `_ ++- Add ``name`` and ``caption`` options. Added in :pr:`41`. + by Raphaël. + - Add support for Python 3.8. + +@@ -36,8 +35,7 @@ + - Make the test suite stop assuming the presence of a 'python' + executable on the path. Instead it uses ``sys.executable`` (which + shouldn't have spaces). Note that it does continue to assume the +- presence of other executables, such as 'echo'. Reported in `issue 38 +- `_ ++ presence of other executables, such as 'echo'. Reported in :issue:`38` + by John Vandenberg. + + +@@ -52,8 +50,7 @@ + - Avoid unicode errors when the program command or output produced + non-ASCII output and the configured prompt was a byte string. This + was most likely under Python 2, where the default configured prompt +- is a byte string. Reported by, and patch inspired by, `issue 33 +- `_ ++ is a byte string. Reported by, and patch inspired by, :issue:`33` + by latricewilgus. + + 0.13 (2018-12-22) +@@ -66,8 +63,7 @@ + - Restore error message into the document by default from failed + program runs on Sphinx >= 1.8.0b1. + +-- Fix deprecation warnings on Sphinx >= 1.8. Reported in `issue 29 +- `_ ++- Fix deprecation warnings on Sphinx >= 1.8. Reported in :issue:`29` + by miili. + + +@@ -75,8 +71,7 @@ + ================= + + - Explicitly set ``parallel_read_safe`` to true in the extension +- metadata. See `issue 25 +- `_. ++ metadata. See :issue:`25` + With thanks to Adam J. Stewart and Stephen McDowell. + + 0.10 (2017-03-17) +@@ -97,9 +92,7 @@ + - Run the tests on Travis CI. Formatting and style is enforced by pylint. + + - The oldest supported and tested Sphinx version is now 1.3.5. See +- `issue 17 +- `_. +- ++ :issue:`17`. + + - Remove support for Python 2.6, Python 3.2 and 3.3. + +diff --git a/doc/conf.py b/doc/conf.py +index 3be3f81..4de0d97 100644 +--- a/doc/conf.py ++++ b/doc/conf.py +@@ -56,9 +56,9 @@ + + extlinks = { + 'issue': ('https://github.com/NextThought/sphinxcontrib-programoutput/issues/%s', +- 'issue #'), ++ 'issue #%s'), + 'pr': ('https://github.com/NextThought/sphinxcontrib-programoutput/pull/%s', +- 'pull request #') ++ 'pull request #%s') + } + + def setup(app): diff --git a/SPECS/python-sphinxcontrib-programoutput.spec b/SPECS/python-sphinxcontrib-programoutput.spec new file mode 100644 index 0000000..224acc6 --- /dev/null +++ b/SPECS/python-sphinxcontrib-programoutput.spec @@ -0,0 +1,253 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.7.3) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 20; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +%{?python_enable_dependency_generator} +%global srcname sphinxcontrib-programoutput +%global _docdir_fmt %{name} + +Name: python-sphinxcontrib-programoutput +Version: 0.17 +Release: %autorelease +Summary: Extension to insert output of commands into documents + +License: BSD-3-Clause +URL: https://pypi.python.org/pypi/sphinxcontrib-programoutput +Source0: https://github.com/NextThought/sphinxcontrib-programoutput/archive/%{version}/%{srcname}-%{version}.tar.gz + +Patch: https://github.com/OpenNTI/sphinxcontrib-programoutput/commit/bd1c14d2e0806dda1902bd452595beaa951aec36.patch + +BuildArch: noarch +BuildRequires: python3-sphinx + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3dist(sphinx) >= 1.3.5 +# The documentation runs commands like 'python -V' and 'python --help'. +# Any python version is fine. +BuildRequires: python-unversioned-command +BuildRequires: pytest +BuildRequires: git +BuildRequires: web-assets-devel + +%description +A Sphinx extension to literally insert the output of arbitrary +commands into documents, helping you to keep your command examples +up to date. + +%package -n python3-%{srcname} +Summary: %{summary} + +Requires: js-jquery +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} +A Sphinx extension to literally insert the output of arbitrary +commands into documents, helping you to keep your command examples +up to date. + +%prep +%autosetup -n %{srcname}-%{version} -p1 +sed -r -i s/python/python3/ src/sphinxcontrib/programoutput/tests/{test_directive.py,test_command.py,test_cache.py} + +%build +%py3_build +rm build/lib/sphinxcontrib/__init__.py + +# workaround https://github.com/python/cpython/issues/94741 +echo 'import importlib; importlib.invalidate_caches(); del importlib' > build/lib/sitecustomize.py +PYTHONPATH=build/lib sphinx-build -b html doc build/html +rm build/lib/sitecustomize.py build/lib/__pycache__/sitecustomize.*.pyc + +rm -r build/html/.buildinfo build/html/.doctrees + +%install +%py3_install +mkdir -p %{buildroot}%{_pkgdocdir} +cp -rv build/html %{buildroot}%{_pkgdocdir}/ +ln -vsf %{_jsdir}/jquery/latest/jquery.min.js %{buildroot}%{_pkgdocdir}/html/_static/jquery.js + +# remove .pth file which is useless under python3 and breaks namespace modules +rm %{buildroot}%{python3_sitelib}/sphinxcontrib_programoutput-*-nspkg.pth + +%check +OPTIONS=( + # Those two fail because of some warnign: + # > assert 'Unexpected return code 1 from command' in excinfo.exception.args[0] + # E assert 'Unexpected return code 1 from command' in "directive 'deprecated' is already registered, it will be overridden" + # I'm not sure what exactly generates this warning. But it doesn't seem to be + # an actual problem with the code, so let's ignore this for now. + -k 'not (test_shell_with_unexpected_return_code or test_unexpected_return_code)' +) + +%pytest -v %{buildroot}%{python3_sitelib}/sphinxcontrib "${OPTIONS[@]}" + + +%files -n python3-%{srcname} +%license LICENSE +%doc %{_pkgdocdir} +%{python3_sitelib}/sphinxcontrib/* +%{python3_sitelib}/sphinxcontrib_programoutput*info/ + +%changelog +* Sat Jan 04 2025 Arkady L. Shane - 0.17-20 +- Rebuilt for MSVSphere 10 + +## START: Generated by rpmautospec +* Tue Sep 10 2024 Zbigniew Jędrzejewski-Szmek - 0.17-20 +- Re-add depedency on pytest for the build + +* Tue Sep 10 2024 Zbigniew Jędrzejewski-Szmek - 0.17-19 +- Fix tests with pytest-8 (rhbz#2280002) + +* Tue Sep 10 2024 Zbigniew Jędrzejewski-Szmek - 0.17-18 +- Adjust SPDX license tag + +* Wed Sep 04 2024 Miroslav Suchý - 0.17-17 +- convert license to SPDX + +* Mon Jul 29 2024 Tomáš Hrnčiar - 0.17-16 +- BuildRequire pytest < 8 + +* Fri Jul 19 2024 Fedora Release Engineering - 0.17-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 0.17-14 +- Rebuilt for Python 3.13 + +* Fri Jan 26 2024 Fedora Release Engineering - 0.17-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 0.17-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 0.17-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 0.17-10 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 0.17-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 0.17-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jul 18 2022 Miro Hrončok - 0.17-7 +- Workaround https://github.com/python/cpython/issues/94741 + +* Mon Jun 13 2022 Python Maint - 0.17-6 +- Rebuilt for Python 3.11 + +* Fri Apr 22 2022 Zbigniew Jędrzejewski-Szmek - 0.17-5 +- Fix build in rawhide (rhbz#2057530) + +* Fri Jan 21 2022 Fedora Release Engineering - 0.17-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 0.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jun 15 2021 Zbigniew Jędrzejewski-Szmek - 0.17-1 +- Latest version (#1945468) + +* Fri Jun 04 2021 Python Maint - 0.16-2 +- Rebuilt for Python 3.10 + +* Mon Feb 1 2021 Zbigniew Jędrzejewski-Szmek - 0.16-1 +- Latest version (#1752563) + +* Wed Jan 27 2021 Fedora Release Engineering - 0.14-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 0.14-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 0.14-6 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 0.14-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 0.14-4 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 0.14-3 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 0.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jun 3 2019 Zbigniew Jędrzejewski-Szmek - 0.14-1 +- Fix compatibility with sphinx 2.0 (#1716531) + +* Fri Apr 26 2019 Yatin Karel - 0.14-1 +- Update to 0.14 (#1697058) + +* Sat Feb 02 2019 Fedora Release Engineering - 0.11-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Dec 29 2018 Igor Gnatenko - 0.11-6 +- Enable python dependency generator + +* Fri Dec 28 2018 Zbigniew Jędrzejewski-Szmek - 0.11-5 +- Subpackage python2-sphinxcontrib-programoutput has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Sat Jul 14 2018 Fedora Release Engineering - 0.11-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 0.11-3 +- Rebuilt for Python 3.7 + +* Wed Feb 28 2018 Iryna Shcherbina - 0.11-2 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Sat Feb 24 2018 Zbigniew Jędrzejewski-Szmek - 0.11-1 +- Switch upstream, update to latest version + +* Fri Feb 09 2018 Fedora Release Engineering - 0.8-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 0.8-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Mar 24 2017 Zbigniew Jędrzejewski-Szmek - 0.8-10 +- Drop useless .pth files under python3 + +* Sat Feb 11 2017 Fedora Release Engineering - 0.8-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Jan 10 2017 Zbigniew Jędrzejewski-Szmek - 0.8-8 +- Fix build with new pytest and sphinx-1.5 + +* Mon Dec 19 2016 Miro Hrončok - 0.8-7 +- Rebuild for Python 3.6 + +* Thu Feb 04 2016 Fedora Release Engineering - 0.8-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Dec 03 2015 Robert Buchholz - 0.8-5 +- epel7: Only build python2 package + +* Mon Nov 16 2015 Zbigniew Jędrzejewski-Szmek - 0.8-4 +- Update to latest packaging guidelines + +* Mon Jul 27 2015 Zbigniew Jędrzejewski-Szmek - 0.8-3 +- Make provides versioned + +* Fri Jul 24 2015 Zbigniew Jędrzejewski-Szmek - 0.8-2 +- Remove stray __pycache__ dir +- Add web-assets-devel to BR and Provide python2-* + +* Tue Jul 21 2015 Zbigniew Jędrzejewski-Szmek - 0.8-1 +- Initial packaging + +## END: Generated by rpmautospec