Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37816662
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 

Патч: python-module-setuptools-40.6.3-alt.patch
Скачать


 setuptools/command/test.py | 5 +++++
 setuptools/dist.py         | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/setuptools/command/test.py b/setuptools/command/test.py
index dde0118..54e3524 100644
--- a/setuptools/command/test.py
+++ b/setuptools/command/test.py
@@ -204,6 +204,11 @@ class test(Command):
         Install the requirements indicated by self.distribution and
         return an iterable of the dists that were built.
         """
+        from os import environ
+        if environ.get('RPM_BUILD_DIR'):
+            dist.install_requires = []
+            dist.test_require = []
+            dist.extras_require = {}
         ir_d = dist.fetch_build_eggs(dist.install_requires)
         tr_d = dist.fetch_build_eggs(dist.tests_require or [])
         er_d = dist.fetch_build_eggs(
diff --git a/setuptools/dist.py b/setuptools/dist.py
index 7062ae8..55c0ebe 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -417,7 +417,8 @@ class Distribution(Distribution_parse_config_files, _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
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin