public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tomas Orsava <torsava@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Fix handling of Python wheels by pythondistdeps.py --provides (#1421776)
Date: Mon, 23 Nov 2026 09:30:35 GMT [thread overview]
Message-ID: <179542623531.1.1318969969971093982.rpms-rpm-cef3bf822054@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : cef3bf822054a87f8f8ae53a31f4af9b3d88359b
Author : Tomas Orsava <torsava@redhat.com>
Date : 2017-02-16T13:54:19+01:00
Stats : +50/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/cef3bf822054a87f8f8ae53a31f4af9b3d88359b?branch=pmatilai-v6
Log:
Fix handling of Python wheels by pythondistdeps.py --provides (#1421776)
---
diff --git a/rpm-4.13.x-pythondistdeps.py-fix-processing-wheels.patch b/rpm-4.13.x-pythondistdeps.py-fix-processing-wheels.patch
new file mode 100644
index 0000000..7aa5eb3
--- /dev/null
+++ b/rpm-4.13.x-pythondistdeps.py-fix-processing-wheels.patch
@@ -0,0 +1,43 @@
+From ff395f4a820497a443baa6cd0198c49b06207c3f Mon Sep 17 00:00:00 2001
+From: Tomas Orsava <torsava@redhat.com>
+Date: Thu, 16 Feb 2017 11:36:29 +0100
+Subject: [PATCH] Fix pythondistdeps.py --provides for Python wheels
+
+As Python wheels do not contain targetted Python version in the directory/file
+name of their metadata like Python eggs do, and since the Python version is not
+contained in the metadata either, it is necessary to get it from elsewhere.
+
+Here it is parsed from the path the metadata resides at
+(e.g. /usr/lib/pythonX.Y/site-packages/...)
+---
+ scripts/pythondistdeps.py | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/scripts/pythondistdeps.py b/scripts/pythondistdeps.py
+index e4b99e2..d44210c 100644
+--- a/scripts/pythondistdeps.py
++++ b/scripts/pythondistdeps.py
+@@ -107,10 +107,17 @@ for f in files:
+ path_item = f
+ metadata = FileMetadata(f)
+ dist = Distribution.from_location(path_item, dist_name, metadata)
+- # Check if py_version is defined in the file
++ # Check if py_version is defined in the metadata file/directory name
+ if not dist.py_version:
+- warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
+- continue
++ # Try to parse the Python version from the path the metadata
++ # resides at (e.g. /usr/lib/pythonX.Y/site-packages/...)
++ import re
++ res = re.search(r"/python(?P<pyver>\d+\.\d)/", path_item)
++ if res:
++ dist.py_version = res.group('pyver')
++ else:
++ warn("Version for {!r} has not been found".format(dist), RuntimeWarning)
++ continue
+ if (Provides_PyMajorVer_Variant or legacy_Provides or legacy) and Provides:
+ # Get the Python major version
+ pyver_major = dist.py_version.split('.')[0]
+--
+2.11.0
+
diff --git a/rpm.spec b/rpm.spec
index 6067093..a5a530b 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -29,7 +29,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: %{?snapver:0.%{snapver}.}1%{?dist}
+Release: %{?snapver:0.%{snapver}.}2%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2
@@ -61,6 +61,9 @@ Patch137: rpm-4.13.x-pythondistdeps.py-show-warning-if-version-is-not-fou.patch
Patch138: rpm-4.13.x-pythondistdeps.py-skip-.egg-link-files.patch
Patch139: rpm-4.13.x-pythondistdeps.py-add-forgotten-import.patch
Patch140: rpm-4.13.x-brp-python-bytecompile-Python3-only.patch
+# Upstream PR: https://github.com/rpm-software-management/rpm/pull/154
+# rhbz#1421776
+Patch141: rpm-4.13.x-pythondistdeps.py-fix-processing-wheels.patch
# Fedora-specific (python3) patch (RHBZ #1405483)
Patch200: rpm-4.13.x-pythondistdeps-python3.patch
@@ -566,6 +569,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Thu Feb 16 2017 Tomas Orsava <torsava@redhat.com> - 4.13.0.1-2
+- Fix handling of Python wheels by pythondistdeps.py --provides (#1421776)
+
* Thu Feb 16 2017 Panu Matilainen <pmatilai@redhat.com> - 4.13.0.1-1
- Update to 4.13.0.1 ((http://rpm.org/wiki/Releases/4.13.0)
reply other threads:[~2026-11-23 9:30 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=179542623531.1.1318969969971093982.rpms-rpm-cef3bf822054@fedoraproject.org \
--to=torsava@redhat.com \
--cc=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