public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/fedpkg] 1.48-1: Unify the hatchling macros with rpkg
Date: Mon, 10 Aug 2026 21:46:16 GMT [thread overview]
Message-ID: <178639837679.1.17897521598520563697.rpms-fedpkg-6695a1860ab4@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/fedpkg
Branch : 1.48-1
Commit : 6695a1860ab4cf633695e0613ee3c234a6f08551
Author : Ondřej Nosek <onosek@redhat.com>
Date : 2025-06-25T04:44:52+02:00
Stats : +25/-19 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/fedpkg/c/6695a1860ab4cf633695e0613ee3c234a6f08551?branch=1.48-1
Log:
Unify the hatchling macros with rpkg
Signed-off-by: Ondřej Nosek <onosek@redhat.com>
---
diff --git a/fedpkg.spec b/fedpkg.spec
index 6ee70b9..faf8e2a 100644
--- a/fedpkg.spec
+++ b/fedpkg.spec
@@ -1,12 +1,15 @@
%define bash_completion_dir %{_datadir}/bash-completion/completions
+# hatchling is not supported in Python 3.6 releases (epel8)
%if 0%{?rhel} == 8
-%define legacy_system 1
+%global with_hatchling 0
+%else
+%global with_hatchling 1
%endif
Name: fedpkg
Version: 1.46
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Fedora utility for working with dist-git
# Automatically converted from old format: GPLv2+ - review is highly recommended.
@@ -30,14 +33,14 @@ Requires: redhat-rpm-config
BuildRequires: python3-devel
BuildRequires: python3-rpkg >= 1.68-1
BuildRequires: python3-distro
-%if !%{defined legacy_system}
+%if 0%{?with_hatchling}
+BuildRequires: pyproject-rpm-macros
BuildRequires: python3-hatchling
+%else
+BuildRequires: python3-setuptools
%endif
# For testing
BuildRequires: python3-pytest
-%if %{defined legacy_system}
-BuildRequires: python3-setuptools
-%endif
BuildRequires: python3-bugzilla
BuildRequires: python3-freezegun
BuildRequires: python3-bodhi-client
@@ -48,7 +51,7 @@ Requires: python3-rpkg >= 1.68-1
Requires: python3-distro
Requires: python3-openidc-client >= 0.6.0
Requires: python3-bodhi-client
-%if %{defined legacy_system}
+%if !0%{?with_hatchling}
Requires: python3-setuptools
%endif
Recommends: fedora-packager
@@ -76,51 +79,51 @@ via the python-argcomplete framework.
%prep
%autosetup -p1
-%if !%{defined legacy_system}
+%if 0%{?with_hatchling}
%generate_buildrequires
%pyproject_buildrequires
%endif
%build
-%if %{defined legacy_system}
-%py_build
-%else
+%if 0%{?with_hatchling}
%pyproject_wheel
+%else
+%py_build
%endif
%{python3} doc/fedpkg_man_page.py > fedpkg.1
%install
-%if %{defined legacy_system}
-%py_install
-%else
+%if 0%{?with_hatchling}
%pyproject_install
%pyproject_save_files -l %{name}
+%else
+%py_install
%endif
%{__install} -d %{buildroot}%{_mandir}/man1
%{__install} -p -m 0644 fedpkg.1 %{buildroot}%{_mandir}/man1
echo "register-python-argcomplete fedpkg" > fedpkg.bash
%{__install} -d %{buildroot}%{bash_completion_dir}
%{__install} -p -m 0644 fedpkg.bash %{buildroot}%{bash_completion_dir}
-%if !%{defined legacy_system}
+%if 0%{?with_hatchling}
# config file /etc/rpkg/fedpkg.conf is extracted to %{buildroot}/usr/etc/... by pyproject_install
%{__install} -d %{buildroot}%{_sysconfdir}
mv %{buildroot}/usr/etc/* %{buildroot}%{_sysconfdir}
%endif
%check
-%if !%{defined legacy_system}
+%if 0%{?with_hatchling}
%pyproject_check_import
%endif
%pytest
-%if %{defined legacy_system}
+%if 0%{?with_hatchling}
+%files -f %{pyproject_files}
+%else
%files
# For noarch packages: sitelib
%{python3_sitelib}/%{name}
%{python3_sitelib}/%{name}-%{version}-py*.egg-info
-%else
-%files -f %{pyproject_files}
%endif
%license COPYING
%doc README.rst CONTRIBUTING.md CHANGELOG.rst
@@ -137,6 +140,9 @@ mv %{buildroot}/usr/etc/* %{buildroot}%{_sysconfdir}
%changelog
+* Tue Jun 24 2025 Ondřej Nosek <onosek@redhat.com> - 1.46-4
+- Unify the hatchling macros with rpkg
+
* Tue Jun 24 2025 Ondřej Nosek <onosek@redhat.com> - 1.46-3
- Switch to %%pyproject_* macros
reply other threads:[~2026-08-10 21:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178639837679.1.17897521598520563697.rpms-fedpkg-6695a1860ab4@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox