mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
bpo-46951: Order contents of zipapps (GH-31713)
So that builds are more reproducible.
This commit is contained in:
parent
bbcf42449e
commit
47e68d4515
3 changed files with 18 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ def create_archive(source, target=None, interpreter=None, main=None,
|
|||
compression = (zipfile.ZIP_DEFLATED if compressed else
|
||||
zipfile.ZIP_STORED)
|
||||
with zipfile.ZipFile(fd, 'w', compression=compression) as z:
|
||||
for child in source.rglob('*'):
|
||||
for child in sorted(source.rglob('*')):
|
||||
arcname = child.relative_to(source)
|
||||
if filter is None or filter(arcname):
|
||||
z.write(child, arcname.as_posix())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue