## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 %global _description %{expand: Dunamai is a Python 3.5+ library and command line tool for producing dynamic, standards-compliant version strings, derived from tags in your version control system. This facilitates uniquely identifying nightly or per-commit builds in continuous integration and releasing new versions of your software simply by creating a tag.} Name: python-dunamai Version: 1.20.0 Release: %{autorelease} Summary: Dynamic version generation # SPDX License: MIT URL: https://pypi.org/pypi/dunamai Source0: https://github.com/mtkennerly/dunamai/archive/v%{version}/%{name}-%{version}.tar.gz BuildArch: noarch %description %_description %package -n python3-dunamai Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest-xdist) BuildRequires: /usr/bin/git BuildRequires: /usr/bin/hg BuildRequires: /usr/bin/darcs BuildRequires: /usr/bin/svn BuildRequires: /usr/bin/bzr BuildRequires: /usr/bin/fossil BuildRequires: help2man # pijul is not in Fedora yet #BuildRequires: /usr/bin/pijul %description -n python3-dunamai %_description %prep %autosetup -n dunamai-%{version} # Comment out to remove /usr/bin/env shebangs # Can use something similar to correct/remove /usr/bin/python shebangs also # find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' # see pyproject-rpm-macros documentation for more forms %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files dunamai # generate man pages for binary in "dunamai" "dunamai check" "dunamai from" "dunamai from any" "dunamai from bazaar" "dunamai from darcs" "dunamai from fossil" "dunamai from git" "dunamai from mercurial" "dunamai from pijul" "dunamai from subversion" do echo "Generating man page for ${binary// /-/}" PYTHONPATH="$PYTHONPATH:%{buildroot}/%{python3_sitelib}/" PATH="$PATH:%{buildroot}/%{_bindir}/" help2man --no-info --no-discard-stderr --name="${binary}" --version-string="${binary} %{version}" --output="${binary// /-}.1" "${binary}" cat "${binary// /-}.1" install -t '%{buildroot}%{_mandir}/man1' -p -m 0644 -D "${binary// /-}.1" done %check # set up git git config --global user.email "you@example.com" git config --global user.name "Your Name" # set up bzr brz whoami "Your Name " # set up darcs export DARCS_EMAIL="Yep something " # skip test that requires network %pytest -n auto -v -k "not test__version__from_git__shallow" %files -n python3-dunamai -f %{pyproject_files} %doc README.md CHANGELOG.md CONTRIBUTING.md %license LICENSE %{_bindir}/dunamai %{_mandir}/man1/dunamai*.1* %changelog ## START: Generated by rpmautospec * Fri Apr 12 2024 Packit - 1.20.0-1 - Update to 1.20.0 upstream release - Resolves: rhbz#2274730 * Fri Feb 16 2024 Packit - 1.19.2-1 - [packit] 1.19.2 upstream release - Resolves rhbz#2264600 * Wed Feb 07 2024 Packit - 1.19.1-1 - [packit] 1.19.1 upstream release - Resolves rhbz#2263185 * Fri Jan 26 2024 Fedora Release Engineering - 1.19.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.19.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Wed Oct 04 2023 Packit - 1.19.0-1 - [packit] 1.19.0 upstream release * Fri Sep 22 2023 Packit - 1.18.1-1 - [packit] 1.18.1 upstream release * Mon Aug 14 2023 Packit - 1.18.0-1 - [packit] 1.18.0 upstream release * Mon Aug 14 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.17.0-4 - chore: add packit * Tue Jul 25 2023 Python Maint - 1.17.0-3 - Rebuilt for Python 3.12 * Fri Jul 21 2023 Fedora Release Engineering - 1.17.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jun 09 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.17.0-1 - feat: update to 1.17.0 (fixes rhbz#2208495) * Mon May 15 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.16.1-1 - feat: update to 1.16.1 (fixes rhbz#2171994) * Mon May 15 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.16.0-2 - fix: fix man page generation * Mon May 01 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.16.0-1 - feat: update to 1.16.0 (fixes rbhz#2171994) * Mon May 01 2023 Ankur Sinha (Ankur Sinha Gmail) - 1.15.0-4 - feat: generate man pages as part of build * Fri Jan 20 2023 Fedora Release Engineering - 1.15.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Dec 26 2022 Benjamin A. Beasley - 1.15.0-2 - Add man pages * Sun Dec 25 2022 Benjamin A. Beasley - 1.15.0-1 - Update to 1.15.0 (close RHBZ#2140491) * Sun Dec 25 2022 Benjamin A. Beasley - 1.13.2-6 - Run tests in parallel * Sun Dec 25 2022 Benjamin A. Beasley - 1.13.2-5 - Add missing BR on setuptools * Sun Dec 25 2022 Benjamin A. Beasley - 1.13.2-4 - Confirm License is SPDX MIT * Tue Nov 01 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.13.2-3 - chore: check in sources (fix rhbz#2138899) * Tue Nov 01 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.13.2-2 - feat: ready for review * Tue Nov 01 2022 Ankur Sinha (Ankur Sinha Gmail) - 1.13.2-1 - init ## END: Generated by rpmautospec