Commit f26bf186 authored by Jason R. Coombs's avatar Jason R. Coombs

Align suffix calculation for extras sections

parent 77044955
...@@ -370,9 +370,8 @@ class Distribution(Distribution_parse_config_files, _Distribution): ...@@ -370,9 +370,8 @@ class Distribution(Distribution_parse_config_files, _Distribution):
self._tmp_extras_require = defaultdict(list) self._tmp_extras_require = defaultdict(list)
for section, v in spec_ext_reqs.items(): for section, v in spec_ext_reqs.items():
for r in pkg_resources.parse_requirements(v): for r in pkg_resources.parse_requirements(v):
if r.marker: suffix = ':' + str(r.marker) if r.marker else ''
section += ':' + str(r.marker) self._tmp_extras_require[section + suffix].append(r)
self._tmp_extras_require[section].append(r)
def _move_install_requirements_markers(self): def _move_install_requirements_markers(self):
""" """
...@@ -400,12 +399,8 @@ class Distribution(Distribution_parse_config_files, _Distribution): ...@@ -400,12 +399,8 @@ class Distribution(Distribution_parse_config_files, _Distribution):
for r in complex_reqs: for r in complex_reqs:
suffix = ':' + str(r.marker) if r.marker else '' suffix = ':' + str(r.marker) if r.marker else ''
sections = [ for section in r.extras or ('',):
section + suffix self._tmp_extras_require[section + suffix].append(r)
for section in r.extras or ('',)
]
for section in sections:
self._tmp_extras_require[section].append(r)
self.extras_require = dict( self.extras_require = dict(
(k, [str(r) for r in map(self._clean_req, v)]) (k, [str(r) for r in map(self._clean_req, v)])
for k, v in self._tmp_extras_require.items() for k, v in self._tmp_extras_require.items()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment