diff options
author | wim glenn <wim.glenn@gmail.com> | 2018-03-16 14:27:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-16 14:27:42 -0500 |
commit | 1fffc0eff9892c7c9bc3b177dd3483a41e85e40e (patch) | |
tree | 77e9188ea1963228801bb878ba73fb679cc9a56f /setuptools/dist.py | |
parent | 696afcad2d750f55c66ffc2a504fa2ebed1b6a59 (diff) | |
download | external_python_setuptools-1fffc0eff9892c7c9bc3b177dd3483a41e85e40e.tar.gz external_python_setuptools-1fffc0eff9892c7c9bc3b177dd3483a41e85e40e.tar.bz2 external_python_setuptools-1fffc0eff9892c7c9bc3b177dd3483a41e85e40e.zip |
address review comments and squash the empty string extra earlier
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r-- | setuptools/dist.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py index 38ab4044..d24958da 100644 --- a/setuptools/dist.py +++ b/setuptools/dist.py @@ -89,8 +89,7 @@ def write_pkg_file(self, file): ) if self.provides_extras: for extra in self.provides_extras: - if extra: - file.write('Provides-Extra: %s\n' % extra) + file.write('Provides-Extra: %s\n' % extra) # from Python 3.4 @@ -390,7 +389,9 @@ class Distribution(Distribution_parse_config_files, _Distribution): # Since this gets called multiple times at points where the # keys have become 'converted' extras, ensure that we are only # truly adding extras we haven't seen before here. - self.metadata.provides_extras.add(extra.split(':')[0]) + extra = extra.split(':')[0] + if extra: + self.metadata.provides_extras.add(extra) self._convert_extras_requirements() self._move_install_requirements_markers() |