aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-07-23 15:59:11 -0400
committerJason R. Coombs <jaraco@jaraco.com>2017-07-23 16:01:40 -0400
commite144d98e8b38ee3440ad4fbf28c085e057858806 (patch)
treebf433d84a5a780b6103a76963603a83acf05e2ea
parentf26bf186bad984b8649a723d795f66c4f8e415f6 (diff)
downloadexternal_python_setuptools-e144d98e8b38ee3440ad4fbf28c085e057858806.tar.gz
external_python_setuptools-e144d98e8b38ee3440ad4fbf28c085e057858806.tar.bz2
external_python_setuptools-e144d98e8b38ee3440ad4fbf28c085e057858806.zip
Parse the requirements just once for simplicity and clarity
-rw-r--r--setuptools/dist.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index 50f5c18f..c4a42183 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -387,14 +387,9 @@ class Distribution(Distribution_parse_config_files, _Distribution):
return not req.marker and not req.extras
spec_inst_reqs = getattr(self, 'install_requires', None) or ()
- simple_reqs = filter(
- is_simple_req,
- pkg_resources.parse_requirements(spec_inst_reqs),
- )
- complex_reqs = filterfalse(
- is_simple_req,
- pkg_resources.parse_requirements(spec_inst_reqs),
- )
+ inst_reqs = list(pkg_resources.parse_requirements(spec_inst_reqs))
+ simple_reqs = filter(is_simple_req, inst_reqs)
+ complex_reqs = filterfalse(is_simple_req, inst_reqs)
self.install_requires = list(map(str, simple_reqs))
for r in complex_reqs: