summaryrefslogtreecommitdiff
path: root/setuptools/config.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-08-28 08:54:02 -0400
committerGitHub <noreply@github.com>2017-08-28 08:54:02 -0400
commitfc59fe8ea080f7d469c6c388fa878c4ede3e6557 (patch)
tree686f4999a87b7710188758a48af81e0cf9aecd5f /setuptools/config.py
parent5da6479d917d77c8091d8b4c32724054ae5adf65 (diff)
downloadpython-setuptools-git-fc59fe8ea080f7d469c6c388fa878c4ede3e6557.tar.gz
Using generator comprehension, avoid casting filepath to bytes on Python 2
Diffstat (limited to 'setuptools/config.py')
-rw-r--r--setuptools/config.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/setuptools/config.py b/setuptools/config.py
index 6fa50d20..23fc25ea 100644
--- a/setuptools/config.py
+++ b/setuptools/config.py
@@ -260,11 +260,8 @@ class ConfigHandler(object):
if not value.startswith(include_directive):
return value
- filepaths = value[len(include_directive):]
- filepaths = filepaths.split(',')
- filepaths = map(str, filepaths) # Needed for Python 2
- filepaths = map(str.strip, filepaths)
- filepaths = map(os.path.abspath, filepaths)
+ spec = value[len(include_directive):]
+ filepaths = (os.path.abspath(path.strip()) for path in spec.split(','))
current_directory = os.getcwd()