Commits

Jon Parise  committed 112f6ff

Parse 'Foo-1.2' into ('Foo','1.2') instead of ('Foo','-1.2').

Previously, the dash was being included in the second match group.

  • Participants
  • Parent commits a6b8ba6

Comments (0)

Files changed (1)

File pip/index.py

 
 def package_to_requirement(package_name):
     """Translate a name like Foo-1.2 to Foo==1.3"""
-    match = re.search(r'^(.*?)(-dev|-\d.*)', package_name)
+    match = re.search(r'^(.*?)-(dev|\d.*)', package_name)
     if match:
         name = match.group(1)
         version = match.group(2)