## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; 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 # Enabled by default %bcond_without tests # 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_without doc_pdf Name: python-configupdater Version: 3.1.1 Release: %autorelease Summary: Parser like ConfigParser but for updating configuration files # ConfigUpdater is licensed under the MIT license; see below for details. # # ConfigUpdater includes code derived from the Python standard library, which # is licensed under the Python license, a permissive open source license. # # It is not well-documented which portions of the software are covered by # Python-2.0.1. License: MIT AND Python-2.0.1 URL: https://github.com/pyscaffold/configupdater Source0: %{pypi_source ConfigUpdater} BuildArch: noarch %if %{with doc_pdf} BuildRequires: make BuildRequires: python3-sphinx-latex BuildRequires: latexmk %endif %global _description %{expand: The sole purpose of ConfigUpdater is to easily update an INI config file with no changes to the original file except the intended ones. This means comments, the ordering of sections and key/value-pairs as well as their cases are kept as in the original file. Thus ConfigUpdater provides complementary functionality to Python’s ConfigParser which is primarily meant for reading config files and writing new ones. Features: The key differences to ConfigParser are: • minimal invasive changes in the update configuration file, • proper handling of comments, • only a single config file can be updated at a time, • the original case of sections and keys are kept, • control over the position of a new section/key The following features are deliberately not implemented: • interpolation of values, • propagation of parameters from the default section, • conversions of values, • passing key/value-pairs with default argument, • non-strict mode allowing duplicate sections and keys.} %description %_description %package -n python3-ConfigUpdater Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-setuptools_scm BuildRequires: %{py3_dist pytest} %description -n python3-ConfigUpdater %_description %package doc Summary: Documentation for %{name} %description doc This package provides generated documentation for %{name}. %prep %autosetup -n ConfigUpdater-%{version} # Remove coverage bits sed -i -r '/(--cov|pytest-cov)/ d' setup.cfg # Drop intersphinx mappings, since we can’t download remote inventories and # can’t easily produce working hyperlinks from inventories in local # documentation packages. echo 'intersphinx_mapping.clear()' >> docs/conf.py %generate_buildrequires %{pyproject_buildrequires \ %{?with_tests:-x testing} %{?with_doc_pdf:docs/requirements.txt}} %build %pyproject_wheel %if %{with doc_pdf} %make_build -C docs latex SPHINXOPTS='-j%{?_smp_build_ncpus}' %make_build -C docs/_build/latex LATEXMKOPTS='-quiet' %endif %install %pyproject_install %pyproject_save_files configupdater %check %if %{with tests} %pytest %endif %files -n python3-ConfigUpdater -f %{pyproject_files} %doc AUTHORS.rst %doc CHANGELOG.rst %doc CONTRIBUTING.rst %doc README.rst %files doc %license LICENSE.txt %if %{with doc_pdf} %doc docs/_build/latex/user_guide.pdf %endif %changelog * Sat May 06 2023 Benjamin A. Beasley 3.1.1-2 - Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus * Sat Apr 15 2023 Benjamin A. Beasley 3.1.1-1 - Update to 3.1.1 (close RHBZ#2101232) * Sat Apr 15 2023 Benjamin A. Beasley 3.1-6 - Drop duplicate license file * Sat Apr 15 2023 Benjamin A. Beasley 3.1-5 - Update License to SPDX * Fri Jan 20 2023 Fedora Release Engineering 3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering 3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint 3.1-2 - Rebuilt for Python 3.11 * Tue Apr 12 2022 Benjamin A. Beasley 3.1-1 - Update to 3.1 (close RHBZ#2058238) * Fri Jan 21 2022 Fedora Release Engineering 3.0.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Fri Jan 07 2022 Benjamin A. Beasley 3.0.1-5 - Clarify intersphinx mapping situation * Thu Dec 23 2021 Benjamin A. Beasley - 3.0.1-2 - Switch to pyproject-rpm-macros - Build Sphinx documentation as PDF instead of HTML to sidestep bundled web assets * Sat Oct 23 2021 Fedora Release Monitoring - 3.0.1-1 - Update to 3.0.1 (#2016777) * Mon Sep 13 2021 Josh Santos - 3.0-1 - new version * Fri Jul 23 2021 Fedora Release Engineering - 2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Wed Jul 07 2021 Ankur Sinha - 2.0-1 - minor typo fixes - improve doc sub-package summary * Wed Jul 07 2021 Ankur Sinha - 2.0-1 - improve doc package description - add space in package description * Tue Jul 06 2021 Ankur Sinha - 2.0-1 - Initial build