diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2017-08-28 08:54:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-28 08:54:02 -0400 |
| commit | fc59fe8ea080f7d469c6c388fa878c4ede3e6557 (patch) | |
| tree | 686f4999a87b7710188758a48af81e0cf9aecd5f /setuptools/config.py | |
| parent | 5da6479d917d77c8091d8b4c32724054ae5adf65 (diff) | |
| download | python-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.py | 7 |
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() |
