[Build Reproducibility] Sort input file list (#35687)

Sort input file list
so that the `.so` file builds in a reproducible way
in spite of non-deterministic filesystem readdir order and
http://bugs.python.org/issue30461

See https://reproducible-builds.org/ for why this is good.

This patch was done while working on reproducible builds for openSUSE.




<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->

---------

Co-authored-by: Richard Belleville <rbellevi@google.com>
pull/35982/head
Bernhard M. Wiedemann 9 months ago committed by GitHub
parent 9b424b5dd4
commit d379dc24c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      setup.py

@ -361,7 +361,8 @@ if BUILD_WITH_SYSTEM_RE2:
EXTENSION_LIBRARIES += ("re2",) EXTENSION_LIBRARIES += ("re2",)
if BUILD_WITH_SYSTEM_ABSL: if BUILD_WITH_SYSTEM_ABSL:
EXTENSION_LIBRARIES += tuple( EXTENSION_LIBRARIES += tuple(
lib.stem[3:] for lib in pathlib.Path("/usr").glob("lib*/libabsl_*.so") lib.stem[3:]
for lib in sorted(pathlib.Path("/usr").glob("lib*/libabsl_*.so"))
) )
DEFINE_MACROS = (("_WIN32_WINNT", 0x600),) DEFINE_MACROS = (("_WIN32_WINNT", 0x600),)

Loading…
Cancel
Save