public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-packaging] rawhide: Slight packaging modernization of the spec file
Date: Sat, 17 Oct 2026 10:42:01 GMT [thread overview]
Message-ID: <179223372126.1.12511400584888047534.rpms-python-packaging-a5a98a9c0a5e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-packaging
Branch : rawhide
Commit : a5a98a9c0a5e9fe1ea472848b6a5be98266a7caa
Author : Miro Hrončok <miro@hroncok.cz>
Date : 2026-10-16T15:32:27+02:00
Stats : +14/-25 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-packaging/c/a5a98a9c0a5e9fe1ea472848b6a5be98266a7caa?branch=rawhide
Log:
Slight packaging modernization of the spec file
- expand %pypi_name for better readability
- use new %bcond syntax
- remove unnecessary source number and %pyproject_buildrequires -r flag
[skip changelog]
---
diff --git a/python-packaging.spec b/python-packaging.spec
index d51fd76..5635cad 100644
--- a/python-packaging.spec
+++ b/python-packaging.spec
@@ -1,33 +1,22 @@
-%global pypi_name packaging
-
# Specify --with bootstrap to build in bootstrap mode
# This mode is needed, because python3-rpm-generators need packaging
-%bcond_with bootstrap
-
+%bcond bootstrap 0
# When bootstrapping, the tests and docs are disabled because the dependencies are not yet available.
# We don't want python-pretend in future RHEL, so we disable tests on RHEL as well.
# No reason to ship the documentation in RHEL either, so it is also disabled by default.
-%if %{without bootstrap} && %{undefined rhel}
-# Specify --without docs to prevent the dependency loop on python-sphinx
+%bcond tests %[%{without bootstrap} && %{undefined rhel}]
# Doc subpackage is disabled because it requires sphinx-toolbox since packaging 24.1
# and that package is not available in Fedora yet.
-%bcond_with docs
-
-# Specify --without tests to prevent the dependency loop on python-pytest
-%bcond_without tests
-%else
-%bcond_with docs
-%bcond_with tests
-%endif
+%bcond docs %[%{without bootstrap} && 0]
-Name: python-%{pypi_name}
+Name: python-packaging
Version: 26.3
Release: %autorelease
Summary: Core utilities for Python packages
License: BSD-2-Clause OR Apache-2.0
URL: https://github.com/pypa/packaging
-Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
+Source: %{url}/archive/%{version}/packaging-%{version}.tar.gz
BuildArch: noarch
@@ -60,7 +49,7 @@ dealing with versions, specifiers, markers etc.}
%description %_description
-%package -n python%{python3_pkgversion}-%{pypi_name}
+%package -n python%{python3_pkgversion}-packaging
Summary: %{summary}
%if %{with bootstrap}
@@ -69,25 +58,25 @@ Provides: python%{python3_version}dist(packaging) = %{version}
Requires: python(abi) = %{python3_version}
%endif
-%description -n python%{python3_pkgversion}-%{pypi_name} %_description
+%description -n python%{python3_pkgversion}-packaging %_description
%if %{with docs}
-%package -n python-%{pypi_name}-doc
+%package -n python-packaging-doc
Summary: python-packaging documentation
-%description -n python-%{pypi_name}-doc
+%description -n python-packaging-doc
Documentation for python-packaging
%endif
%prep
-%autosetup -p1 -n %{pypi_name}-%{version}
+%autosetup -p1 -n packaging-%{version}
%if %{without bootstrap}
%generate_buildrequires
-%pyproject_buildrequires -r
+%pyproject_buildrequires
%endif
@@ -116,7 +105,7 @@ unzip dist/packaging-%{version}-py3-none-any.whl -d %{buildroot}%{python3_siteli
echo '%{python3_sitelib}/packaging*' > %{pyproject_files}
%else
%pyproject_install
-%pyproject_save_files --assert-license %{pypi_name}
+%pyproject_save_files --assert-license packaging
%endif
@@ -127,12 +116,12 @@ echo '%{python3_sitelib}/packaging*' > %{pyproject_files}
%endif
-%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
+%files -n python%{python3_pkgversion}-packaging -f %{pyproject_files}
%doc README.rst CHANGELOG.rst CONTRIBUTING.rst
%if %{with docs}
-%files -n python-%{pypi_name}-doc
+%files -n python-packaging-doc
%doc html
%license LICENSE LICENSE.APACHE LICENSE.BSD
%endif
reply other threads:[~2026-10-17 10:42 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=179223372126.1.12511400584888047534.rpms-python-packaging-a5a98a9c0a5e@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