From 6c76e26fa63bff2757143aca607443afbc3325cf Mon Sep 17 00:00:00 2001 From: John Sirois Date: Wed, 9 Oct 2024 14:55:56 -0700 Subject: [PATCH] build: Fix build reproducibility. Without going the extra length of exporting `PYTHONHASHSEED=0` or similar, the built sdist and wheel for a given version of the project would have inconsistent random ordering of extras_require entries between builds. This was observed attempting to lock a VCS requirement on this project here: https://github.com/pantsbuild/pants/discussions/21145 On the bright side, it led to Pex fixing its building and locking code to be robust to this sort of (unintended) bad behavior: https://github.com/pex-tool/pex/pull/2554 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 89813f7c17..9b8028cafb 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ def load_requirements(file_list: Optional[Union[str, List[str]]] = None) -> List tsv_reqs = load_requirements("requirements/extra-csv.in") xlsx_reqs = load_requirements("requirements/extra-xlsx.in") -all_doc_reqs = list( +all_doc_reqs = sorted( set( csv_reqs + docx_reqs