## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## 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 Name: python-setuptools-git-versioning Version: 2.1.0 Release: %autorelease Summary: Use git repo data for building a version number according to PEP-440 License: MIT URL: https://setuptools-git-versioning.readthedocs.io/ %global forgeurl https://github.com/dolfinus/setuptools-git-versioning Source: %{forgeurl}/archive/v%{version}/setuptools-git-versioning-%{version}.tar.gz # Fix a small typo in the package description # https://github.com/dolfinus/setuptools-git-versioning/pull/116 Patch: %{forgeurl}/pull/116.patch # Remove test dependency on unmaintained PyPI toml package # https://github.com/dolfinus/setuptools-git-versioning/pull/117 # https://fedoraproject.org/wiki/Changes/DeprecatePythonToml Patch: %{forgeurl}/pull/117.patch # Downstream-only: patch out coverage-analysis machinery # # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters Patch: 0001-Downstream-only-patch-out-coverage-analysis-machiner.patch BuildArch: noarch BuildRequires: python3-devel BuildRequires: git-core BuildRequires: help2man %global _description %{expand: Use git repo data (latest tag, current commit hash, etc) for building a version number according to PEP 440. Features: • Can be installed & configured through both setup.py and PEP 518’s pyproject.toml • Does not require to change source code of the project • Tag-, file-, and callback-based versioning schemas are supported • Templates for tag, dev and dirty versions are separated • Templates support a lot of substitutions including git and environment information • Well-documented Limitations: • Currently the only supported VCS is Git • Only Git v2 is supported • Only Setuptools build backend is supported (no Poetry & others) • Currently does not support automatic exporting of package version to a file for runtime use (but you can use setuptools-git-versioning > file redirect instead)} %description %_description %package -n python3-setuptools-git-versioning Summary: %{summary} %description -n python3-setuptools-git-versioning %_description %prep %autosetup -n setuptools-git-versioning-%{version} -S git # If we make any changes, do them above this line, and then: # git add --all # git commit -m 'Downstream changes' --allow-empty # Needed for correct version metadata (otherwise defaults to 0.0.1, # https://bugzilla.redhat.com/show_bug.cgi?id=2405588). git tag v2.1.0 %generate_buildrequires %pyproject_buildrequires requirements-test.txt %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l setuptools_git_versioning install -d '%{buildroot}%{_mandir}/man1' %{py3_test_envvars} help2man --no-info --no-discard-stderr \ --name='%{summary}' --version-string='%{version}' \ --output='%{buildroot}%{_mandir}/man1/setuptools-git-versioning.1' \ setuptools-git-versioning %check %pyproject_check_import # Tries to install “wheel” from PyPI, even with python3-wheel installed k="${k-}${k+ and }not test_config_not_used" %pytest -k "${k-}" -v %files -n python3-setuptools-git-versioning -f %{pyproject_files} %{_bindir}/setuptools-git-versioning %{_mandir}/man1/setuptools-git-versioning.1* %changelog ## START: Generated by rpmautospec * Wed Oct 22 2025 Benjamin A. Beasley - 2.1.0-16 - Run the tests * Wed Oct 22 2025 Benjamin A. Beasley - 2.1.0-15 - Fix incorrect version in metadata (fix RHBZ#2405588) * Wed Oct 22 2025 Benjamin A. Beasley - 2.1.0-13 - Fix a small typo in the package summary and description - Tidy up the package description a bit * Wed Oct 22 2025 Benjamin A. Beasley - 2.1.0-12 - Simplify man page generation * Wed Oct 22 2025 Benjamin A. Beasley - 2.1.0-11 - Fix wrong Summary on binary package * Wed Oct 22 2025 Benjamin A. Beasley - 2.1.0-9 - Fix the source archive name * Fri Sep 19 2025 Python Maint - 2.1.0-7 - Rebuilt for Python 3.14.0rc3 bytecode * Fri Aug 15 2025 Python Maint - 2.1.0-6 - Rebuilt for Python 3.14.0rc2 bytecode * Fri Jul 25 2025 Fedora Release Engineering - 2.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Mon Jun 02 2025 Python Maint - 2.1.0-4 - Rebuilt for Python 3.14 * Sat Feb 08 2025 Packit - 2.1.0-3 - Update to 2.1.0 upstream release - Resolves: rhbz#2336900 * Sat Jan 18 2025 Fedora Release Engineering - 2.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Mon Jan 13 2025 Benjamin A. Beasley - 2.1.0-1 - Update to 2.1.0 (close RHBZ#2336900) * Fri Jul 19 2024 Fedora Release Engineering - 2.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Jun 07 2024 Python Maint - 2.0.0-2 - Rebuilt for Python 3.13 * Mon Apr 08 2024 Packit - 2.0.0-1 - Update to 2.0.0 upstream release - Resolves: rhbz#2274050 * Tue Jan 30 2024 Packit - 1.13.6-1 - [packit] 1.13.6 upstream release - Resolves rhbz#2261897 * Fri Jan 26 2024 Fedora Release Engineering - 1.13.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.13.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Dec 31 2023 Benjamin A. Beasley - 1.13.5-2 - Assert that %%pyproject_files contains a license file * Sun Sep 24 2023 Packit - 1.13.5-1 - [packit] 1.13.5 upstream release * Thu Aug 10 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.13.3-6 - chore: add packit conf * Fri Jul 21 2023 Fedora Release Engineering - 1.13.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Mon Jun 26 2023 Python Maint - 1.13.3-4 - Rebuilt for Python 3.12 * Wed Jun 21 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.13.3-3 - feat: import sources (fixes rbhz#2213973) * Wed Jun 21 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.13.3-2 - feat: ready for review * Wed Jun 21 2023 Ankur Sinha (Ankur Sinha Gmail) - init ## END: Generated by rpmautospec