Commit 4e818019 authored by PJ Eby's avatar PJ Eby

Fix entry point parsing when a standalone module name has whitespace

between it and the extras.

--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4045765
parent 847ce20a
......@@ -1873,7 +1873,7 @@ class EntryPoint(object):
src
)
else:
return cls(name.strip(), value.lstrip(), attrs, extras, dist)
return cls(name.strip(), value.strip(), attrs, extras, dist)
parse = classmethod(parse)
......
......@@ -254,18 +254,18 @@ class EntryPointTests(TestCase):
def checkSubMap(self, m):
self.assertEqual(str(m),
"{"
"'feature2': EntryPoint.parse("
"{'feature2': EntryPoint.parse("
"'feature2 = another.module:SomeClass [extra1,extra2]'), "
"'feature3': EntryPoint.parse('feature3 = this.module [something]'), "
"'feature1': EntryPoint.parse("
"'feature1 = somemodule:somefunction')"
"}"
"'feature1 = somemodule:somefunction')}"
)
submap_str = """
# define features for blah blah
feature1 = somemodule:somefunction
feature2 = another.module:SomeClass [extra1,extra2]
feature3 = this.module [something]
"""
def testParseList(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment