From b7db595854f3b6eb4b4174ba9297b1737d23314b Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Sun, 30 Jan 2022 19:09:16 +0100 Subject: [PATCH] setup.py: Make build reproducible by sorting generator input Debian's reproducible builds infrastructure reports that the ordering of objects listed in the tlobjects dict in /usr/lib/python3/dist-packages/telethon/tl/alltlobjects.py depends on the filesystem ordering of the *.tl files read at build time. Fix that by sorting the list in setup.py. Reproducible builds are desirable for security and auditing reasons, and easing QA. More details at https://reproducible-builds.org/ . --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index caf4a54a..373fc90c 100755 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ METHODS_IN = GENERATOR_DIR / 'data/methods.csv' # Which raw API methods are covered by *friendly* methods in the client? FRIENDLY_IN = GENERATOR_DIR / 'data/friendly.csv' -TLOBJECT_IN_TLS = [Path(x) for x in GENERATOR_DIR.glob('data/*.tl')] +TLOBJECT_IN_TLS = [Path(x) for x in sorted(GENERATOR_DIR.glob('data/*.tl'))] TLOBJECT_OUT = LIBRARY_DIR / '_tl' TLOBJECT_MOD = 'telethon._tl'