Skip to content

Commit

Permalink
Preserve order of egg_info section in setup.cfg
Browse files Browse the repository at this point in the history
egg_info is the dictionary with information that is injected
into setup.cfg. edit_config uses RawConfigParser which uses
collections.OrderedDict for all the data. Since we use a
simple dict(), when we loop through items in edit_config, we
see random behavior as a result the fields
tag_svn_revision/tag_date/tag_build are added to the setup.cfg
randomly. Let's add a OrderedDict to make it more predictable.
  • Loading branch information
dims committed Apr 18, 2016
1 parent fc6aec4 commit 6706943
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setuptools/command/egg_info.py
Expand Up @@ -2,6 +2,7 @@
Create a distribution's .egg-info directory and contents"""

from collections import OrderedDict
from distutils.filelist import FileList as _FileList
from distutils.util import convert_path
from distutils import log
Expand Down Expand Up @@ -67,7 +68,7 @@ def initialize_options(self):

def save_version_info(self, filename):
values = dict(
egg_info=dict(
egg_info=OrderedDict(
tag_svn_revision=0,
tag_date=0,
tag_build=self.tags(),
Expand Down

0 comments on commit 6706943

Please sign in to comment.