From 452e13ce06ca0cdebebc61c9326a2db184095353 Mon Sep 17 00:00:00 2001 From: Gabi Davar Date: Sat, 30 Jul 2016 16:52:11 +0300 Subject: fix for extra names containing '-' --- pkg_resources/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg_resources/__init__.py') diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 27d70a60..80da5c18 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1428,7 +1428,7 @@ def safe_extra(extra): Any runs of non-alphanumeric characters are replaced with a single '_', and the result is always lowercased. """ - return re.sub('[^A-Za-z0-9.]+', '_', extra).lower() + return re.sub('[^A-Za-z0-9.-]+', '_', extra).lower() def to_filename(name): @@ -2807,8 +2807,8 @@ class DistInfoDistribution(Distribution): dm[None].extend(common) for extra in self._parsed_pkg_info.get_all('Provides-Extra') or []: - extra = safe_extra(extra.strip()) - dm[extra] = list(frozenset(reqs_for_extra(extra)) - common) + s_extra = safe_extra(extra.strip()) + dm[s_extra] = list(frozenset(reqs_for_extra(extra)) - common) return dm -- cgit v1.2.3