Group :: Desenvolvimento/Python
RPM: python-module-setuptools
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: 0002-dist.py-skip-checking-the-existence-of-system-PKG-IN.patch
Download
Download
From 8e89f8e958227914e3c9c0ebcba0c1d5dde94ad6 Mon Sep 17 00:00:00 2001
From: Ivan Zakharyaschev <imz@altlinux.org>
Date: Wed, 23 Mar 2016 21:24:25 +0300
Subject: [PATCH 2/2] dist.py: skip checking the existence of system PKG-INFO
for new Distribution instances during rpmbuild
To: wine-patches <wine-patches@winehq.org>
This would avoid the self-dependency often generated by buildreq.
If it's a Distribution instance for the package we are building, then
the old system PKG-INFO would make no sense for us.
If it's a Distribution instance for another installed package, then...
...well, possibly, Distribution instances for such cases are not used.
Or we should simply rely on the metadata guarantees given by RPM and
work well with some fake/patched version info.
---
setuptools/setuptools/dist.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/setuptools/setuptools/dist.py b/setuptools/setuptools/dist.py
index d7ad465..82cccbd 100644
--- a/setuptools/setuptools/dist.py
+++ b/setuptools/setuptools/dist.py
@@ -244,7 +244,8 @@ class Distribution(_Distribution):
return
key = pkg_resources.safe_name(str(attrs['name'])).lower()
dist = pkg_resources.working_set.by_key.get(key)
- if dist is not None and not dist.has_metadata('PKG-INFO'):
+ if dist is not None and (os.environ.get('RPM_BUILD_DIR')
+ or not dist.has_metadata('PKG-INFO')):
dist._version = pkg_resources.safe_version(str(attrs['version']))
self._patched_dist = dist
--
2.10.3