summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-09-17 11:05:33 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-09-17 11:05:33 -0400
commit90b24ccedfd8f09da531373e4caa18822f146535 (patch)
tree3f40f73986f859e8fc8603156af33ab3c5e570a1
parentf8b9faa7f3813dd46d93c03529df573c133e29f2 (diff)
downloadwheel-90b24ccedfd8f09da531373e4caa18822f146535.tar.gz
Fix multi-entrypoint failure on Python 3.
EntryPoint() is not comparable, so convert to string and sort those instead. We only need the string anyway. Update the complex-dist/setup.py to have multiple entrypoints, though I didn't see anything in the test that verifies that all of the entrypoints were successful.
-rw-r--r--wheel/metadata.py4
-rw-r--r--wheel/test/complex-dist/setup.py7
2 files changed, 8 insertions, 3 deletions
diff --git a/wheel/metadata.py b/wheel/metadata.py
index 02c0663..8756fde 100644
--- a/wheel/metadata.py
+++ b/wheel/metadata.py
@@ -191,8 +191,8 @@ def pkginfo_to_dict(path, distribution=None):
exports = OrderedDict()
for group, items in sorted(ep_map.items()):
exports[group] = OrderedDict()
- for item in sorted(items.values()):
- name, export = str(item).split(' = ', 1)
+ for item in sorted(map(str, items.values())):
+ name, export = item.split(' = ', 1)
exports[group][name] = export
if exports:
metadata['extensions']['python.exports'] = exports
diff --git a/wheel/test/complex-dist/setup.py b/wheel/test/complex-dist/setup.py
index 802dbaf..615d5dc 100644
--- a/wheel/test/complex-dist/setup.py
+++ b/wheel/test/complex-dist/setup.py
@@ -20,6 +20,11 @@ setup(name='complex-dist',
install_requires=["quux", "splort"],
extras_require={'simple':['simple.dist']},
tests_require=["foo", "bar>=10.0.0"],
- entry_points={'console_scripts':['complex-dist=complexdist:main']}
+ entry_points={
+ 'console_scripts': [
+ 'complex-dist=complexdist:main',
+ 'complex-dist2=complexdist:main',
+ ],
+ },
)