## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 16; 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 URL: https://pypi.python.org/pypi/sphinxcontrib-programoutput Source0: https://github.com/NextThought/sphinxcontrib-programoutput/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-sphinx BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3dist(sphinx) >= 1.3.5 # the package does not work with pytest 8 # downstream issue: https://bugzilla.redhat.com/show_bug.cgi?id=2280002 BuildRequires: python3-pytest < 8 # The documentation runs commands like 'python -V' and 'python --help'. # Any python version is fine. BuildRequires: python-unversioned-command 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 # Seems not needed with python3.10+. Remove when older version don't need to be supported. rm -rf build/lib/sphinxcontrib/__pycache__ %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 %pytest -v %{buildroot}%{python3_sitelib}/sphinxcontrib -k 'not test_standard_error_disabled' %files -n python3-%{srcname} %license LICENSE %doc %{_pkgdocdir} %{python3_sitelib}/sphinxcontrib/* %{python3_sitelib}/sphinxcontrib_programoutput*info/ %changelog ## START: Generated by rpmautospec * 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