## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; 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 # Sphinx-generated HTML documentation is not suitable for packaging; see # https://bugzilla.redhat.com/show_bug.cgi?id=2006555 for discussion. # # We can generate PDF documentation as a substitute. %bcond doc_pdf 1 Name: python-ZConfig Version: 4.1 Release: %autorelease Summary: Structured Configuration Library License: ZPL-2.1 URL: https://github.com/zopefoundation/ZConfig/ Source0: %{pypi_source zconfig} # Man pages hand-written for Fedora in groff_man(7) format based on --help Source1: zconfig.1 Source2: zconfig_schema2html.1 # Fix test failure for Python3.13b1 # https://github.com/zopefoundation/ZConfig/commit/7d4cbabc5f450ac4d9e228d79778c21805136b2c # # From: # # Support Python 3.13 # https://github.com/zopefoundation/ZConfig/pull/97 # # Fixes: # # Test failure in test_filehandler_reopen_thread_safety on Python 3.13 # https://github.com/zopefoundation/ZConfig/issues/96 # # python-ZConfig fails to build with Python 3.13: # test_filehandler_reopen_thread_safety: AssertionError: Lists differ: [] != # ['acquire', 'acquire', 'release', 'release'] # https://bugzilla.redhat.com/show_bug.cgi?id=2279549 # # Patch modified to contain only the fix, without the changelog entry. Patch: zconfig-4.1-python3.13.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: symlinks %if %{with doc_pdf} # Documentation BuildRequires: make BuildRequires: %{py3_dist sphinx} BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif %global common_description %{expand: ZConfig is a configuration library intended for general use. It supports a hierarchical schema-driven configuration model that allows a schema to specify data conversion routines written in Python. ZConfig’s model is very different from the model supported by the ConfigParser module found in Python’s standard library, and is more suitable to configuration-intensive applications. ZConfig schema are written in an XML-based language and are able to “import” schema components provided by Python packages. Since components are able to bind to conversion functions provided by Python code in the package (or elsewhere), configuration objects can be arbitrarily complex, with values that have been verified against arbitrary constraints. This makes it easy for applications to separate configuration support from configuration loading even with configuration data being defined and consumed by a wide range of separate packages.} %description %{common_description} %package -n python3-ZConfig Summary: Structured Configuration Library # Add Provides corresponding to the canonical project name %py_provides python3-zconfig %description -n python3-ZConfig %{common_description} %package -n python3-ZConfig+test Summary: Tests and test extras for ZConfig Requires: python3-ZConfig = %{version}-%{release} # Add Provides corresponding to the canonical project name %py_provides python3-zconfig+test %description -n python3-ZConfig+test These are the tests for python3-ZConfig. This package: • Provides the “ZConfig.tests” package • Makes sure the “test” extra dependencies are installed %package doc Summary: Documentation for ZConfig # We have a symlink to a text file in the installed package. Requires: python3-ZConfig = %{version}-%{release} # Add Provides corresponding to the canonical project name Provides: python-zconfig-doc = %{version}-%{release} %description doc %{common_description} This package contains the documentation for ZConfig. %prep %autosetup -n zconfig-%{version} -p1 # We can’t cross-reference Internet documentation. echo 'intersphinx_mapping.clear()' >> docs/conf.py %generate_buildrequires %pyproject_buildrequires -x test%{?with_doc_pdf:,docs} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files ZConfig install -t '%{buildroot}%{_mandir}/man1' -p -m 0644 -D \ '%{SOURCE1}' '%{SOURCE2}' %if %{with doc_pdf} # Building documentation in the install section is “weird,” but the # documentation needs to incorporate the --help output from the command-line # tools (via sphinxcontrib-programoutput), and those entry points are not # generated until the wheel is installed, so this is the “least-worst” # workaround. PYTHONPATH='%{buildroot}%{python3_sitelib}' PATH="${PATH}:%{buildroot}%{_bindir}" \ %make_build -C docs latex SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C docs/_build/latex LATEXMKOPTS='-quiet' %endif # We can’t move the file ZConfig/schemaless.txt out of the package because # there is a test that actually checks for its presence. We can at least mark # it as documentation in-place. sed -r -i 's/^.*schemaless.txt/%doc &/' '%{pyproject_files}' # Since we have one documentation file installed with an absolute path, the # rest need to be that way too. install -p -m 0644 -t '%{buildroot}%{_pkgdocdir}' -D \ CHANGES.rst \ README.rst \ docs/schema.dtd \ %{?with_doc_pdf:docs/_build/latex/ZConfig.pdf} # Make a relative symlink. ln -s '%{buildroot}%{python3_sitelib}/ZConfig/schemaless.txt' \ '%{buildroot}%{_pkgdocdir}/schemaless.txt' symlinks -c '%{buildroot}%{_pkgdocdir}/schemaless.txt' %check PYTHONPATH="${PWD}/src" %{python3} -m zope.testrunner --test-path=src -v %files -n python3-ZConfig -f %{pyproject_files} # pyproject_files handles LICENSE.txt in dist-info, but COPYRIGHT.txt is not # present there, so we manually install both files to %%{_licensedir} %license COPYRIGHT.txt %license LICENSE.txt # These are installed with the test extra subpackage. %exclude %{python3_sitelib}/ZConfig/tests/ %{_bindir}/zconfig %{_bindir}/zconfig_schema2html %{_mandir}/man1/zconfig.1* %{_mandir}/man1/zconfig_schema2html.1* %files -n python3-ZConfig+test %{python3_sitelib}/ZConfig/tests/ %ghost %{python3_sitelib}/*.dist-info %files doc # Depends on python3-ZConfig: separate copies of license files are not needed. %doc %{_pkgdocdir}/CHANGES.rst %doc %{_pkgdocdir}/README.rst %doc %{_pkgdocdir}/schema.dtd %doc %{_pkgdocdir}/schemaless.txt %if %{with doc_pdf} %doc %{_pkgdocdir}/ZConfig.pdf %endif %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 4.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sun Jun 09 2024 Python Maint - 4.1-4 - Rebuilt for Python 3.13 * Sat May 18 2024 Benjamin A. Beasley - 4.1-3 - Backport Python 3.13 test failure patch (fix RHBZ#2279549) * Sat May 11 2024 Benjamin A. Beasley - 4.1-2 - Skip a test failure on Python 3.13 (close RHBZ#2279549) - The failure is apparently harmless and was reported upstream. * Fri May 03 2024 Benjamin A. Beasley - 4.1-1 - Update to 4.1 (close RHBZ#2278800) * Fri May 03 2024 Benjamin A. Beasley - 4.0-11 - Add Provides corresponding to the canonical project name * Fri May 03 2024 Benjamin A. Beasley - 4.0-10 - Fix a test issue on Python 3.12+ * Fri May 03 2024 Benjamin A. Beasley - 4.0-9 - Fix running tests with zope.testrunner 6.4 * Fri Jan 26 2024 Fedora Release Engineering - 4.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 4.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jul 21 2023 Fedora Release Engineering - 4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Thu Jun 29 2023 Python Maint - 4.0-3 - Rebuilt for Python 3.12 * Sun Jun 18 2023 Benjamin A. Beasley - 4.0-2 - Use new (rpm 4.17.1+) bcond style * Fri May 05 2023 Benjamin A. Beasley - 4.0-1 - Update to 4.0 (close RHBZ#2193316) * Sat Mar 18 2023 Benjamin A. Beasley - 3.6.1-4 - Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus * Fri Jan 20 2023 Fedora Release Engineering - 3.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Dec 21 2022 Benjamin A. Beasley - 3.6.1-2 - Add man pages for command-line tools * Tue Dec 06 2022 Benjamin A. Beasley - 3.6.1-1 - Update to 3.6.1 (close RHBZ#2151242) * Sat Dec 03 2022 Benjamin A. Beasley - 3.6.0-7 - Fix inclusion of program output in PDF docs * Sat Dec 03 2022 Benjamin A. Beasley - 3.6.0-6 - Add a subpackage for the tests - Upstream very intentionally distributes them in their PyPI wheels, so we might as well make them available. * Sat Dec 03 2022 Benjamin A. Beasley - 3.6.0-5 - Package CHANGES.rst and schema.dtd as docs * Sat Dec 03 2022 Benjamin A. Beasley - 3.6.0-4 - Restore PDF docs, now built ourselves and in a -doc subpackage * Sat Dec 03 2022 Benjamin A. Beasley - 3.6.0-3 - Symlink to schemaless.txt from the documentation directory * Sat Dec 03 2022 Benjamin A. Beasley - 3.6.0-2 - Port to pyproject-rpm-macros * Sat Dec 03 2022 Benjamin A. Beasley - 3.6.0-1 - Update to 3.6.0 (close RHBZ#1464439) - There is no longer prebuilt PDF documentation. - Tests now work on all current Fedora releases * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-39 - Stop globbing over the whole python3_sitelib * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-38 - Use the autosetup macro * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-37 - Improve the description * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-36 - Enable the tests (with caveats) * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-35 - Use standard build/install macros * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-34 - Use pypi_source macro * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-33 - Fix obsolete URL * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-32 - Drop Conflicts with long-absent python2 version * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-31 - Drop obsolete python_provide macro * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-30 - Update License to SPDX * Sat Dec 03 2022 Benjamin A. Beasley - 3.1.0-29 - Spec-file reformatting * Fri Jul 22 2022 Fedora Release Engineering - 3.1.0-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 3.1.0-25 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 3.1.0-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jul 23 2021 Fedora Release Engineering - 3.1.0-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 3.1.0-22 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 3.1.0-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 3.1.0-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 3.1.0-19 - Rebuilt for Python 3.9 * Thu Jan 30 2020 Fedora Release Engineering - 3.1.0-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 3.1.0-17 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 3.1.0-16 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 3.1.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Mon Feb 11 2019 Miro Hrončok - 3.1.0-14 - Subpackage python2-ZConfig has been removed See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal * Sat Feb 02 2019 Fedora Release Engineering - 3.1.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 3.1.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 3.1.0-11 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 3.1.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Mon Jan 15 2018 Iryna Shcherbina - 3.1.0-9 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Thu Jul 27 2017 Fedora Release Engineering - 3.1.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 3.1.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 3.1.0-6 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 3.1.0-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 3.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Nov 16 2015 Ralph Bean - 3.1.0-3 - Modernize python macros. - Provide explicit python2 subpackage. * Tue Nov 10 2015 Fedora Release Engineering - 3.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Sun Oct 18 2015 Ralph Bean - 3.1.0-1 - new version * Thu Jun 18 2015 Fedora Release Engineering - 3.0.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Jun 10 2014 Ralph Bean - 3.0.4-1 - Latest upstream. - Added python3 subpackage. - Modernized python2 macros * Sat Jun 07 2014 Fedora Release Engineering - 2.9.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 2.9.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 2.9.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 2.9.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Mar 12 2012 Robin Lee - 2.9.2-1 - Update to 2.9.2 * Sat Jan 14 2012 Fedora Release Engineering - 2.9.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Wed Mar 30 2011 Robin Lee - 2.9.0-1 - Update to 2.9.0 (#689762) - Exclude the tests * Tue Feb 08 2011 Fedora Release Engineering - 2.8.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jul 21 2010 David Malcolm - 2.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Wed Jun 16 2010 Robin Lee - 2.8.0-3 - Workaround of installation * Wed Jun 16 2010 Robin Lee - 2.8.0-2 - Retag * Wed Jun 16 2010 Robin Lee - 2.8.0-1 - 2.8.0 - BR: python-zope-testing removed - More docs included * Sun Jul 26 2009 Fedora Release Engineering - 2.7.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Jun 18 2009 Conrad Meyer - 2.7.1-1 - New version. * Sun Dec 14 2008 Conrad Meyer - 2.6.1-1 - Initial package. ## END: Generated by rpmautospec