diff options
| -rw-r--r-- | pkg_resources/__init__.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 4cdb40dc..507bacc6 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2267,9 +2267,17 @@ 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>.+))? )? )?$", - re.VERBOSE | re.IGNORECASE + r""" + (?P<name>.*?) ( + -(?P<ver>[^-]+) ( + -py(?P<pyver>[^-]+) ( + -(?P<plat>.+) + )? + )? + )? + $ + """, + re.VERBOSE | re.IGNORECASE, ).match |
