aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2013-10-10 20:46:09 +0000
committerPascal Terjan <pterjan@gmail.com>2013-10-10 20:47:35 +0000
commite4238c4cb2736ef13208bd08fd235f980e6903be (patch)
tree14c8ba0a0bd8dc90a16f2af6f1dda2902e2c0fbe
parentbc4afb1d852ecce5bc17b8329bbcf076e45ab28d (diff)
Have differrent provides/requires for python2 and python3 egg
-rw-r--r--NEWS2
-rwxr-xr-xpythoneggs.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 2727df8..7db4b0f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- have differrent provides/requires for python2 and python3 egg
+
Version 1.190 - 28 Sep 2013, by Funda Wang
- add switch -d to gem_install to move headers into vendorarchdir
diff --git a/pythoneggs.py b/pythoneggs.py
index 1627cd2..a2d9bc0 100755
--- a/pythoneggs.py
+++ b/pythoneggs.py
@@ -85,6 +85,7 @@ for f in files:
path_item = f
metadata = FileMetadata(f)
dist = Distribution.from_location(path_item, dist_name, metadata)
+ py_major = dist.py_version[:1]
if Provides:
# If egg metadata says package name is python, we provide python(abi)
if dist.key == 'python':
@@ -92,7 +93,7 @@ for f in files:
if not name in py_deps:
py_deps[name] = []
py_deps[name].append(('==', dist.py_version))
- name = 'pythonegg(%s)' % dist.key
+ name = 'pythonegg(%s)(%s)' % (py_major, dist.key)
if not name in py_deps:
py_deps[name] = []
if dist.version:
@@ -122,7 +123,7 @@ for f in files:
deps = depsextras
# add requires/suggests based on egg metadata
for dep in deps:
- name = 'pythonegg(%s)' % dep.key
+ name = 'pythonegg(%s)(%s)' % (py_major, dep.key)
for spec in dep.specs:
if spec[0] != '!=':
if not name in py_deps: