aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-03-20 12:34:02 -0400
committerJason R. Coombs <jaraco@jaraco.com>2015-03-20 12:34:02 -0400
commita074b625e3c765ac62cb4240d5c8d1d35152f8f4 (patch)
tree1d46fdcdbf82e87e2b513511251e8da18baf03d6
parenta54a764326d516950861d2d317150e7e172bd99f (diff)
downloadexternal_python_setuptools-a074b625e3c765ac62cb4240d5c8d1d35152f8f4.tar.gz
external_python_setuptools-a074b625e3c765ac62cb4240d5c8d1d35152f8f4.tar.bz2
external_python_setuptools-a074b625e3c765ac62cb4240d5c8d1d35152f8f4.zip
Update EGG_NAME regular expression matcher to allow names to include dashes. Fixes failing test and fixes #307.
-rw-r--r--pkg_resources/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index c3686f88..4cdb40dc 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -2267,8 +2267,8 @@ OBRACKET = re.compile(r"\s*\[").match
CBRACKET = re.compile(r"\s*\]").match
MODULE = re.compile(r"\w+(\.\w+)*$").match
EGG_NAME = re.compile(
- r"(?P<name>[^-]+)"
- r"( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?",
+ r"(?P<name>.*?)"
+ r"( -(?P<ver>[^-]+) (-py(?P<pyver>[^-]+) (-(?P<plat>.+))? )? )?$",
re.VERBOSE | re.IGNORECASE
).match