aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources/__init__.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-10-14 13:47:31 -0400
committerGitHub <noreply@github.com>2016-10-14 13:47:31 -0400
commit72cc77c65a7c64489e23c6bf3a4219137ad48dac (patch)
tree971bf8e03537aae67bf50dce2bcac7d4d5b5bf48 /pkg_resources/__init__.py
parentb2205e843dd54d2511844a906b6f2496314ef8b2 (diff)
parent452e13ce06ca0cdebebc61c9326a2db184095353 (diff)
downloadexternal_python_setuptools-72cc77c65a7c64489e23c6bf3a4219137ad48dac.tar.gz
external_python_setuptools-72cc77c65a7c64489e23c6bf3a4219137ad48dac.tar.bz2
external_python_setuptools-72cc77c65a7c64489e23c6bf3a4219137ad48dac.zip
Merge pull request #732 from mindw/fix_extra_names_dash
fix for extra names containing '-'
Diffstat (limited to 'pkg_resources/__init__.py')
-rw-r--r--pkg_resources/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 37bf1482..1b8d02f5 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -1398,7 +1398,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):
@@ -2790,8 +2790,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