summaryrefslogtreecommitdiffstats
path: root/Lib/zipapp.py
diff options
context:
space:
mode:
authorhfinucane <h.finucane+gh@gmail.com>2022-05-27 16:04:29 (GMT)
committerGitHub <noreply@github.com>2022-05-27 16:04:29 (GMT)
commit47e68d451586541259ffb6ae29e948d4ea67c059 (patch)
treecc008a3ed0d440920ccc1ee2d884e01c54861ab4 /Lib/zipapp.py
parentbbcf42449e13c0b62f145cd49d12674ef3d5bf64 (diff)
downloadcpython-47e68d451586541259ffb6ae29e948d4ea67c059.zip
cpython-47e68d451586541259ffb6ae29e948d4ea67c059.tar.gz
cpython-47e68d451586541259ffb6ae29e948d4ea67c059.tar.bz2
bpo-46951: Order contents of zipapps (GH-31713)
So that builds are more reproducible.
Diffstat (limited to 'Lib/zipapp.py')
-rw-r--r--Lib/zipapp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/zipapp.py b/Lib/zipapp.py
index ce77632..d8ebfcb 100644
--- a/Lib/zipapp.py
+++ b/Lib/zipapp.py
@@ -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())