[Python-checkins] distutils2: Use VersionPredicate to get the name in depgraph instead of parsing it twice.
tarek.ziade
python-checkins at python.org
Sun Aug 8 11:50:47 CEST 2010
tarek.ziade pushed 3c734f59ebf2 to distutils2:
http://hg.python.org/distutils2/rev/3c734f59ebf2
changeset: 495:3c734f59ebf2
parent: 474:437bda319048
user: Alexis Metaireau <ametaireau at gmail.com>
date: Fri Aug 06 16:43:26 2010 +0200
summary: Use VersionPredicate to get the name in depgraph instead of parsing it twice.
files: src/distutils2/depgraph.py
diff --git a/src/distutils2/depgraph.py b/src/distutils2/depgraph.py
--- a/src/distutils2/depgraph.py
+++ b/src/distutils2/depgraph.py
@@ -135,8 +135,7 @@
requires = dist.metadata['Requires-Dist'] + dist.metadata['Requires']
for req in requires:
predicate = VersionPredicate(req)
- comps = req.strip().rsplit(" ", 1)
- name = comps[0]
+ name = predicate.name
if not name in provided:
graph.add_missing(dist, req)
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list