## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## 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 # when bootstrapping Python, pytest-xdist is not yet available %bcond xdist %{undefined rhel} # Package the placeholder rpm-macros (moved to redhat-rpm-config in F40) %if ! (0%{?fedora} >= 40 || 0%{?rhel} >= 10) %bcond rpmmacropkg 1 %else %bcond rpmmacropkg 0 %endif # Appease old Poetry versions (<1.2.0a2) %if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 38 || 0%{?rhel} >= 10 %bcond oldpoetry 0 %else %bcond oldpoetry 1 %endif %global srcname rpmautospec %global canonicalname %{py_dist_name %{srcname}} Name: python-%{canonicalname} Version: 0.5.0 Release: %autorelease Summary: Package and CLI tool to generate release fields and changelogs License: MIT URL: https://github.com/fedora-infra/%{canonicalname} Source0: https://github.com/fedora-infra/%{canonicalname}/releases/download/%{version}/%{canonicalname}-%{version}.tar.gz Patch100: rpmautospec-0.4.1-old-poetry.patch BuildArch: noarch BuildRequires: git # the langpacks are needed for tests BuildRequires: glibc-langpack-de BuildRequires: glibc-langpack-en BuildRequires: python3-devel >= 3.9.0 # The dependencies needed for testing don’t get auto-generated. BuildRequires: python3dist(pytest) %if %{with xdist} BuildRequires: python3dist(pytest-xdist) %endif BuildRequires: python3dist(pyyaml) BuildRequires: sed %global _description %{expand: A package and CLI tool to generate RPM release fields and changelogs.} %description %_description %package -n python3-%{canonicalname} Summary: %{summary} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{canonicalname} %_description %package -n %{canonicalname} Summary: CLI tool for generating RPM releases and changelogs Requires: python3-%{canonicalname} = %{version}-%{release} %description -n %{canonicalname} CLI tool for generating RPM releases and changelogs %if %{with rpmmacropkg} %package -n rpmautospec-rpm-macros Summary: Rpmautospec RPM macros for local rpmbuild Requires: rpm %description -n rpmautospec-rpm-macros This package contains RPM macros with placeholders for building rpmautospec enabled packages locally. %endif %generate_buildrequires %pyproject_buildrequires %prep %autosetup -n %{srcname}-%{version} -N %autopatch -M 99 %if %{with oldpoetry} %autopatch 100 %endif # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters sed -i -e '/pytest-cov/d; /addopts.*--cov/d' pyproject.toml %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} # Work around poetry not listing license files as such in package metadata. sed -i -e 's|^\(.*/LICENSE\)|%%license \1|g' %{pyproject_files} %if %{with rpmmacropkg} mkdir -p %{buildroot}%{rpmmacrodir} install -m 644 rpm/macros.d/macros.rpmautospec %{buildroot}%{rpmmacrodir}/ %endif %check %pytest -v \ %if %{with xdist} --numprocesses=auto %endif %files -n python3-%{canonicalname} -f %{pyproject_files} %doc README.rst %files -n %{canonicalname} %{_bindir}/rpmautospec %if %{with rpmmacropkg} %files -n rpmautospec-rpm-macros %{rpmmacrodir}/macros.rpmautospec %endif %changelog * Mon Jan 15 2024 Nils Philippsen - 0.5.0-1 - Update to 0.5.0 * Thu Jan 11 2024 Nils Philippsen - 0.4.2-1 - Update to 0.4.2 * Mon Jan 08 2024 Nils Philippsen - 0.4.1-2 - Update patch for old poetry versions * Fri Dec 15 2023 Nils Philippsen - 0.4.1-1 - Update to 0.4.1 * Sun Dec 03 2023 Yaakov Selkowitz - 0.4.0-2 - Drop unwanted python-pytest-cov dependency * Thu Nov 30 2023 Nils Philippsen - 0.4.0-1 - Update to 0.4.0 * Sat Nov 18 2023 Arkady L. Shane - 0.3.8-1 - Rebuilt for MSVSphere 9.2 * Tue Nov 14 2023 Nils Philippsen - 0.3.8-1 - Update to 0.3.8 * Tue Nov 14 2023 Nils Philippsen - 0.3.7-1 - Update to 0.3.7 * Tue Nov 14 2023 Nils Philippsen - 0.3.6-1 - Update to 0.3.6 * Tue Aug 22 2023 Yaakov Selkowitz - 0.3.5-5 - Disable the macros subpackage in F40+ * Fri Jul 21 2023 Fedora Release Engineering - 0.3.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jun 14 2023 Python Maint - 0.3.5-3 - Rebuilt for Python 3.12 * Wed May 24 2023 Yaakov Selkowitz - 0.3.5-2 - Avoid pytest-cov, disable xdist in RHEL builds * Wed Feb 08 2023 Nils Philippsen - 0.3.5-1 - Update to 0.3.5 * Wed Feb 08 2023 Nils Philippsen - 0.3.4-1 - Update to 0.3.4 * Wed Feb 08 2023 Nils Philippsen - 0.3.3-1 - Update to 0.3.3 * Tue Jan 24 2023 Nils Philippsen - 0.3.2-1 - Update to 0.3.2 * Fri Jan 20 2023 Fedora Release Engineering - 0.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Nov 11 2022 Nils Philippsen - 0.3.1-1 - Update to 0.3.1 * Wed Jul 27 2022 Nils Philippsen - 0.3.0-1 - Update to 0.3.0 * Wed Jun 08 2022 Nils Philippsen - Generally BR: python3-pytest-xdist, also on EL9 * Mon May 16 2022 Nils Philippsen - 0.2.8-1 - Update to 0.2.8 - Don't require python3-pytest-xdist for building on EL9 * Mon May 16 2022 Nils Philippsen - 0.2.7-1 - Update to 0.2.7 * Mon Apr 25 2022 Nils Philippsen - 0.2.6-1 - Update to 0.2.6 - Require python3-pytest-xdist for building - Remove EL7 quirks, pkg isn't built there * Fri Mar 04 2022 Nils Philippsen - require python3-pyyaml for building * Sun Nov 07 2021 Nils Philippsen - require python3-babel and glibc langpacks (the latter for testing) * Fri Aug 06 2021 Nils Philippsen - 0.2.5-1 - Update to 0.2.5 * Thu Aug 05 2021 Nils Philippsen - 0.2.4-1 - Update to 0.2.4 * Wed Jun 16 2021 Nils Philippsen - 0.2.3-1 - Update to 0.2.3 * Fri Jun 04 2021 Nils Philippsen - 0.2.2-1 - Update to 0.2.2 * Thu May 27 2021 Nils Philippsen - 0.2.1-1 - Update to 0.2.1 * Thu May 27 2021 Stephen Coady - 0.2.0-1 - Update to 0.2.0 * Thu May 27 2021 Nils Philippsen - don't ship obsolete Koji configuration snippet * Wed May 19 2021 Nils Philippsen - remove git-core, fix RPM related dependencies * Wed May 12 2021 Nils Philippsen - depend on python3-pygit2 * Thu Apr 22 2021 Nils Philippsen - remove the hub plugin * Thu Apr 15 2021 Nils Philippsen - 0.1.5-1 - Update to 0.1.5 - Have lowercase URLs, because Pagure d'oh * Thu Apr 15 2021 Nils Philippsen - 0.1.4-1 - Update to 0.1.4 - explicitly BR: python3-setuptools * Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.3-1 - Update to 0.1.3 * Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.2-1 - Update to 0.1.2 * Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.1-1 - Update to 0.1.1 * Thu Apr 09 2020 Pierre-Yves Chibon - 0.1.0-1 - Update to 0.1.0 * Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.23-1 - Update to 0.023 * Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.22-1 - Update to 0.0.22 * Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.21-1 - Update to 0.0.21 * Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.20-1 - Update to 0.0.20 * Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.19-1 - Update to 0.0.19 * Wed Apr 08 2020 Pierre-Yves Chibon - 0.0.18-1 - Update to 0.0.18 * Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.17-1 - Update to 0.0.17 * Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.16-1 - Update to 0.0.16 * Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.15-1 - Update to 0.0.15 * Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.14-1 - Update to 0.0.14 * Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.13-1 - Update to 0.0.13 * Tue Apr 07 2020 Pierre-Yves Chibon - 0.0.12-1 - Update to 0.0.12 * Mon Apr 06 2020 Pierre-Yves Chibon - 0.0.11-1 - Update to 0.0.11 * Fri Apr 03 2020 Nils Philippsen - 0.0.10-1 - Update to 0.0.10 * Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.9-1 - Update to 0.0.9 * Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.8-1 - Update to 0.0.8 * Fri Apr 03 2020 Pierre-Yves Chibon - 0.0.7-1 - Update to 0.0.7 * Thu Apr 02 2020 Pierre-Yves Chibon - 0.0.6-1 - Update to 0.0.6 * Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.5-1 - Update to 0.0.5 * Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.4-1 - Update to 0.0.4 * Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.3-1 - Update to 0.0.3 * Tue Mar 31 2020 Pierre-Yves Chibon - 0.0.2-1 - Update to 0.0.2 * Wed Mar 18 2020 Adam Saleh - 0.0.1-1 - initial package for Fedora