python-setuptools/sort-for-reproducibility.patch

54 lines
2.1 KiB
Diff
Raw Normal View History

Index: setuptools-57.0.0/setuptools/command/easy_install.py
===================================================================
--- setuptools-57.0.0.orig/setuptools/command/easy_install.py
+++ setuptools-57.0.0/setuptools/command/easy_install.py
@@ -407,7 +407,7 @@ class easy_install(Command):
for spec in self.args:
self.easy_install(spec, not self.no_deps)
if self.record:
- outputs = self.outputs
+ outputs = list(sorted(self.outputs))
if self.root: # strip any package prefix
root_len = len(self.root)
for counter in range(len(outputs)):
Index: setuptools-57.0.0/setuptools/command/egg_info.py
===================================================================
--- setuptools-57.0.0.orig/setuptools/command/egg_info.py
+++ setuptools-57.0.0/setuptools/command/egg_info.py
@@ -654,7 +654,7 @@ def _write_requirements(stream, reqs):
def append_cr(line):
return line + '\n'
- lines = map(append_cr, lines)
+ lines = map(append_cr, sorted(lines))
stream.writelines(lines)
Index: setuptools-57.0.0/setuptools/dist.py
===================================================================
--- setuptools-57.0.0.orig/setuptools/dist.py
+++ setuptools-57.0.0/setuptools/dist.py
@@ -214,7 +214,7 @@ def write_pkg_file(self, file): # noqa:
self.long_description_content_type
)
if self.provides_extras:
- for extra in self.provides_extras:
+ for extra in sorted(self.provides_extras):
write_field('Provides-Extra', extra)
self._write_list(file, 'License-File', self.license_files or [])
Index: setuptools-57.0.0/setuptools/tests/test_egg_info.py
===================================================================
--- setuptools-57.0.0.orig/setuptools/tests/test_egg_info.py
+++ setuptools-57.0.0/setuptools/tests/test_egg_info.py
@@ -297,8 +297,8 @@ class TestEggInfo:
wheel>=0.5
pytest
- wheel>=0.5
pytest
+ wheel>=0.5
''',
'''