Generate python3egg reqs for python3

This commit is contained in:
Denis Silakov 2013-06-14 14:30:35 +04:00
parent 6a32d74fee
commit 2d3328fc35
2 changed files with 43 additions and 12 deletions

View file

@ -0,0 +1,43 @@
diff -Naur rpm-5.4.10.orig/rpm-5.4.10-python3-no-egg-provides.patch rpm-5.4.10/rpm-5.4.10-python3-no-egg-provides.patch
--- rpm-5.4.10.orig/rpm-5.4.10-python3-no-egg-provides.patch 1970-01-01 03:00:00.000000000 +0300
+++ rpm-5.4.10/rpm-5.4.10-python3-no-egg-provides.patch 2013-06-14 12:45:01.000000000 +0400
@@ -0,0 +1,12 @@
+diff -Naur rpm-5.4.10.orig/scripts/pythoneggs.py rpm-5.4.10/scripts/pythoneggs.py
+--- rpm-5.4.10/scripts/pythoneggs.py 2012-05-08 02:34:19.000000000 +0400
++++ rpm-5.4.10.orig/scripts/pythoneggs.py 2013-06-14 12:44:15.551212810 +0400
+@@ -119,6 +119,8 @@
+ metadata = FileMetadata(f)
+ dist = Distribution.from_location(path_item, dist_name, metadata)
+ if Provides:
++ if f.find('python3') > 0:
++ continue
+ # If egg metadata says package name is python, we provide python(abi)
+ if dist.key == 'python':
+ name = 'python(abi)'
diff -Naur rpm-5.4.10.orig/scripts/pythoneggs.py rpm-5.4.10/scripts/pythoneggs.py
--- rpm-5.4.10.orig/scripts/pythoneggs.py 2013-06-14 14:26:18.171626023 +0400
+++ rpm-5.4.10/scripts/pythoneggs.py 2013-06-14 14:28:45.434611910 +0400
@@ -125,7 +125,10 @@
if not name in py_deps:
py_deps[name] = []
py_deps[name].append(('==', dist.py_version))
- name = 'pythonegg(%s)' % dist.key
+ if f.find('python3') > 0:
+ name = 'python3egg(%s)' % dist.key
+ else:
+ name = 'pythonegg(%s)' % dist.key
if not name in py_deps:
py_deps[name] = []
if dist.version:
@@ -155,7 +158,10 @@
deps = depsextras
# add requires/suggests based on egg metadata
for dep in deps:
- name = 'pythonegg(%s)' % dep.key
+ if f.find('python3') > 0:
+ name = 'python3egg(%s)' % dep.key
+ else:
+ name = 'pythonegg(%s)' % dep.key
for spec in dep.specs:
if spec[0] != '!=':
if not name in py_deps:

View file

@ -1,12 +0,0 @@
diff -Naur rpm-5.4.10.orig/scripts/pythoneggs.py rpm-5.4.10/scripts/pythoneggs.py
--- rpm-5.4.10/scripts/pythoneggs.py 2012-05-08 02:34:19.000000000 +0400
+++ rpm-5.4.10.orig/scripts/pythoneggs.py 2013-06-14 12:44:15.551212810 +0400
@@ -119,6 +119,8 @@
metadata = FileMetadata(f)
dist = Distribution.from_location(path_item, dist_name, metadata)
if Provides:
+ if f.find('python3') > 0:
+ continue
# If egg metadata says package name is python, we provide python(abi)
if dist.key == 'python':
name = 'python(abi)'