diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-04-20 09:25:21 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-04-20 09:25:21 -0400 |
commit | 085247fa441f9b0fac05117ca1a3283e3510fb32 (patch) | |
tree | b068b08a093257c4b60b86f6fbf1e164f8e3125a /setuptools/command/setopt.py | |
parent | df05ebf3e88858ae7ac74071bd20c86782e1415d (diff) | |
download | external_python_setuptools-085247fa441f9b0fac05117ca1a3283e3510fb32.tar.gz external_python_setuptools-085247fa441f9b0fac05117ca1a3283e3510fb32.tar.bz2 external_python_setuptools-085247fa441f9b0fac05117ca1a3283e3510fb32.zip |
Use OrderedDict to retain deterministic ordering of version info in egg_info command. Remove lexicographic ordering in setopt.edit_config. Ref #553
Diffstat (limited to 'setuptools/command/setopt.py')
-rwxr-xr-x | setuptools/command/setopt.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/setuptools/command/setopt.py b/setuptools/command/setopt.py index 912da782..7f332be5 100755 --- a/setuptools/command/setopt.py +++ b/setuptools/command/setopt.py @@ -2,7 +2,6 @@ from distutils.util import convert_path from distutils import log from distutils.errors import DistutilsOptionError import distutils -import operator import os from setuptools.extern.six.moves import configparser @@ -43,8 +42,7 @@ def edit_config(filename, settings, dry_run=False): log.debug("Reading configuration from %s", filename) opts = configparser.RawConfigParser() opts.read([filename]) - for section, options in sorted(settings.items(), - key=operator.itemgetter(0)): + for section, options in settings.items(): if options is None: log.info("Deleting section [%s] from %s", section, filename) opts.remove_section(section) @@ -52,8 +50,7 @@ def edit_config(filename, settings, dry_run=False): if not opts.has_section(section): log.debug("Adding new section [%s] to %s", section, filename) opts.add_section(section) - for option, value in sorted(options.items(), - key=operator.itemgetter(0)): + for option, value in options.items(): if value is None: log.debug( "Deleting %s.%s from %s", |