diff options
author | Pascal Terjan <pterjan@gmail.com> | 2013-10-10 20:46:09 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2013-10-10 20:47:35 +0000 |
commit | e4238c4cb2736ef13208bd08fd235f980e6903be (patch) | |
tree | 14c8ba0a0bd8dc90a16f2af6f1dda2902e2c0fbe | |
parent | bc4afb1d852ecce5bc17b8329bbcf076e45ab28d (diff) | |
download | rpm-setup-e4238c4cb2736ef13208bd08fd235f980e6903be.tar rpm-setup-e4238c4cb2736ef13208bd08fd235f980e6903be.tar.gz rpm-setup-e4238c4cb2736ef13208bd08fd235f980e6903be.tar.bz2 rpm-setup-e4238c4cb2736ef13208bd08fd235f980e6903be.tar.xz rpm-setup-e4238c4cb2736ef13208bd08fd235f980e6903be.zip |
Have differrent provides/requires for python2 and python3 egg
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | pythoneggs.py | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -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: |