Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37807608
en ru br
Репозитории ALT
S:42.0.0-alt3
5.1: 0.6-alt1.c9
4.1: 0.6-alt1.c7.1
4.0: 0.6-alt1.c5
www.altlinux.org/Changes

Группа :: Разработка/Python
Пакет: python-module-setuptools

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0002-dist.py-skip-checking-the-existence-of-system-PKG-IN.patch
Скачать


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
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin