From a074b625e3c765ac62cb4240d5c8d1d35152f8f4 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Mar 2015 12:34:02 -0400 Subject: Update EGG_NAME regular expression matcher to allow names to include dashes. Fixes failing test and fixes #307. --- pkg_resources/__init__.py | 4 ++-- 1 file 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[^-]+)" - r"( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?", + r"(?P.*?)" + r"( -(?P[^-]+) (-py(?P[^-]+) (-(?P.+))? )? )?$", re.VERBOSE | re.IGNORECASE ).match -- cgit v1.2.3