aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsetuptools/command/egg_info.py2
-rw-r--r--setuptools/tests/test_egg_info.py12
2 files changed, 7 insertions, 7 deletions
diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py
index 3c033300..8e1502a5 100755
--- a/setuptools/command/egg_info.py
+++ b/setuptools/command/egg_info.py
@@ -77,9 +77,9 @@ class egg_info(Command):
egg_info = odict()
# follow the order these keys would have been added
# when PYTHONHASHSEED=0
+ egg_info['tag_build'] = self.tags()
egg_info['tag_date'] = 0
egg_info['tag_svn_revision'] = 0
- egg_info['tag_build'] = self.tags()
edit_config(filename, dict(egg_info=egg_info))
def finalize_options(self):
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py
index 8fbf1323..3a0db58f 100644
--- a/setuptools/tests/test_egg_info.py
+++ b/setuptools/tests/test_egg_info.py
@@ -84,7 +84,8 @@ class TestEggInfo(object):
assert 'tag_date = 0' in content
assert 'tag_svn_revision = 0' in content
- expected_order = 'tag_date', 'tag_svn_revision', 'tag_build'
+ expected_order = 'tag_build', 'tag_date', 'tag_svn_revision'
+
self._validate_content_order(content, expected_order)
@staticmethod
@@ -93,6 +94,10 @@ class TestEggInfo(object):
Assert that the strings in expected appear in content
in order.
"""
+ if sys.version_info < (2, 7):
+ # On Python 2.6, expect dict key order.
+ expected = dict.fromkeys(expected).keys()
+
pattern = '.*'.join(expected)
flags = re.MULTILINE | re.DOTALL
assert re.search(pattern, content, flags)
@@ -129,11 +134,6 @@ class TestEggInfo(object):
expected_order = 'tag_build', 'tag_date', 'tag_svn_revision'
- if sys.version_info < (2, 7):
- # On Python 2.6, config gets overridden, retaining order
- # from the dict.
- expected_order = dict.fromkeys(expected_order).keys()
-
self._validate_content_order(content, expected_order)
def test_egg_base_installed_egg_info(self, tmpdir_cwd, env):