]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- rel 46; fake python version for eggs dependency generator, so it will generate... auto/th/rpm-5.4.15-46
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 27 Sep 2018 08:25:17 +0000 (10:25 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 27 Sep 2018 08:25:17 +0000 (10:25 +0200)
rpm-pythoneggs.patch
rpm.spec

index f328c88bf357f5e569c515236d2cbd9d16ba0d17..dc8e3df7076e29c5193c05b3827f87f340d6fdaf 100644 (file)
@@ -1,6 +1,6 @@
---- rpm-5.4.10/scripts/pythoneggs.py.orig      2012-05-08 00:34:19.000000000 +0200
-+++ rpm-5.4.10/scripts/pythoneggs.py   2013-05-09 13:22:26.000000000 +0200
-@@ -16,7 +16,7 @@
+--- rpm-5.4.15.org/scripts/pythoneggs.py       2012-05-08 00:39:11.000000000 +0200
++++ rpm-5.4.15/scripts/pythoneggs.py   2018-09-27 10:23:33.011831652 +0200
+@@ -16,7 +16,7 @@ from pkg_resources import Distribution,
  from distutils.sysconfig import get_python_lib
  from subprocess import Popen, PIPE, STDOUT
  import os
@@ -9,7 +9,7 @@
  
  opts, args = getopt(argv[1:], 'hPRSCOEb:',
          ['help', 'provides', 'requires', 'suggests', 'conflicts', 'obsoletes', 'extras','buildroot='])
-@@ -29,6 +29,13 @@
+@@ -29,6 +29,13 @@ Obsoletes = False
  Extras = False
  buildroot = None
  
@@ -23,7 +23,7 @@
  for o, a in opts:
      if o in ('-h', '--help'):
          print '-h, --help\tPrint help'
-@@ -125,11 +132,14 @@
+@@ -125,11 +132,14 @@ for f in files:
                  if not name in py_deps:
                      py_deps[name] = []
                  py_deps[name].append(('==', dist.py_version))
                  if not spec in py_deps[name]:
                      py_deps[name].append(spec)
          if Requires or (Suggests and dist.extras):
-@@ -155,13 +165,17 @@
+@@ -145,6 +155,14 @@ for f in files:
+                 spec = ('==', dist.py_version)
+                 if not spec in py_deps[name]:
+                     py_deps[name].append(spec)
++            # fake python version for dist.requires(), so deps like
++            # [:python_version < '3']
++            # enum34
++            # will be handled correctly
++            old_python_version = platform.python_version
++            def new_python_version():
++                return dist.py_version
++            platform.python_version = new_python_version
+             deps = dist.requires()
+             if Suggests:
+                 depsextras = dist.requires(extras=dist.extras)
+@@ -153,15 +171,20 @@ for f in files:
+                         if dep in deps:
+                             depsextras.remove(dep)
                  deps = depsextras
++            platform.python_version = old_python_version
              # add requires/suggests based on egg metadata
              for dep in deps:
 -                name = 'pythonegg(%s)' % dep.key
index 242b4d20cbaf072bd2fa9f115487cfc49370847d..d78672a9d5d0ed786a8e8984eb057d7760b24ca6 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -47,7 +47,7 @@ Summary(ru.UTF-8):    Менеджер пакетов от RPM
 Summary(uk.UTF-8):     Менеджер пакетів від RPM
 Name:          rpm
 Version:       5.4.15
-Release:       45
+Release:       46
 License:       LGPL v2.1
 Group:         Base
 # http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
This page took 0.10027 seconds and 4 git commands to generate.