Skip to content

Commit

Permalink
setup.py: Make build reproducible by sorting generator input (#3695)
Browse files Browse the repository at this point in the history
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/ .
  • Loading branch information
df7cb committed Feb 12, 2022
1 parent a00f742 commit ccedf4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -54,7 +54,7 @@ def __exit__(self, *args):
# 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'

Expand Down

0 comments on commit ccedf4a

Please sign in to comment.