## START: Set by rpmautospec ## (rpmautospec version 0.2.5) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec Name: python-userpath Version: 1.8.0 Release: %autorelease Summary: Cross-platform tool for adding locations to the user PATH License: MIT URL: https://github.com/ofek/userpath Source0: %{pypi_source userpath} # Cannot use %%pyproject_buildrequires -r (the default) with hatchling: # “ValueError: build backend cannot provide build metadata (incl. runtime # requirements) before build”. See: https://github.com/ofek/hatch/issues/128 # # We work around this by writing the dependencies from pyproject.toml into a # text file. This may not be necessary in the future; see: # https://bugzilla.redhat.com/show_bug.cgi?id=2076994 Source1: extract-hatchling-dependencies # Man pages in groff_man(7) format hand-written for Fedora based on --help # output. Source10: userpath.1 Source11: userpath-append.1 Source12: userpath-prepend.1 Source13: userpath-verify.1 BuildArch: noarch BuildRequires: python3-devel # RHBZ#1985340 BuildRequires: pyproject-rpm-macros >= 1.1.0 # For script in %%generate_buildrequires: BuildRequires: python3dist(tomli) %global common_description %{expand: \ Cross-platform tool for adding locations to the user PATH, no elevated privileges required!} %description %common_description %package -n python3-userpath Summary: %{summary} %description -n python3-userpath %common_description %prep %autosetup -n userpath-%{version} # Dev requirements include test requirements; but we want to filter out # coverage, linting, etc. sed -r '/^(coverage)$/d' requirements-dev.txt > requirements-dev.filtered.txt %generate_buildrequires '%{SOURCE1}' -v %pyproject_buildrequires -R _req/project.txt requirements-dev.filtered.txt %build %pyproject_wheel %install %pyproject_install %pyproject_save_files userpath install -t '%{buildroot}%{_mandir}/man1' -p -m 0644 -D \ '%{SOURCE10}' '%{SOURCE11}' '%{SOURCE12}' '%{SOURCE13}' %check # We use pytest directly, since the only contribution of the tox configuration # is adding coverage analysis—which we do not want. %pytest %files -n python3-userpath -f %{pyproject_files} %license LICENSE.txt %doc HISTORY.rst %doc README.md %{_bindir}/userpath %{_mandir}/man1/userpath*.1* %changelog * Sat Apr 30 2022 Benjamin A. Beasley 1.8.0-4 - Adjust for pyproject-rpm-macros >= 1.1.0 * Sat Apr 23 2022 Benjamin A. Beasley 1.8.0-3 - Further improved hatchling helper script * Sat Apr 23 2022 Benjamin A. Beasley 1.8.0-2 - Improved hatchling workaround script * Tue Feb 22 2022 Benjamin A. Beasley 1.8.0-1 - Update to 1.8.0 (fix RHBZ#2048296); license change * Tue Feb 22 2022 Benjamin A. Beasley 1.7.0-6 - Add man pages * Mon Feb 14 2022 Benjamin A. Beasley 1.7.0-5 - Add HISTORY.rst to documentation * Mon Feb 14 2022 Benjamin A. Beasley 1.7.0-4 - Port to pyproject-rpm-macros * Fri Jan 21 2022 Fedora Release Engineering - 1.7.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Jul 25 2021 Lumír Balhar - 1.7.0-1 - Update to 1.7.0 Resolves: rhbz#1985646 * Fri Jul 23 2021 Fedora Release Engineering - 1.6.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 1.6.0-2 - Rebuilt for Python 3.10 * Mon May 31 2021 Lumír Balhar - 1.6.0-1 - Update to 1.6.0 Resolves: rhbz#1965766 * Mon May 10 2021 Lumír Balhar - 1.5.0-1 - Update to 1.5.0 Resolves: rhbz#1958519 * Thu Feb 18 2021 Lumír Balhar - 1.4.2-3 - No longer provide the old package name * Wed Jan 27 2021 Fedora Release Engineering - 1.4.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Jan 18 2021 Lumír Balhar - 1.4.2-1 - Update to 1.4.2 (#1917150) * Tue Aug 04 2020 Lumír Balhar - 1.4.1-4 - Fix FTBFS — remove unversioned python macro * Sat Aug 01 2020 Fedora Release Engineering - 1.4.1-3 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 1.4.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Wed Jul 01 2020 Charalampos Stratakis - 1.4.1-1 - Update to 1.4.1 (#1851126) * Tue May 26 2020 Miro Hrončok - 1.4.0-2 - Rebuilt for Python 3.9 * Mon May 11 2020 Lumír Balhar - 1.4.0-1 - Update to 1.4.0 (#1833676) * Sat Feb 08 2020 Lumír Balhar - 1.3.0-3 - Provide more variants of the old package name * Thu Jan 30 2020 Fedora Release Engineering - 1.3.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Oct 30 2019 Lumír Balhar - 1.3.0-1 - Initial package. - Replacement for python-adduserpath