Reproducible ZipFile (supports shutil.archive)
Project description
Reproducible / Deterministic ZipFiles
A tool to generate consistent zip files.
Installation
pip install reproducible_zip
Usage
The module uses the same interface as the python builtin zipfile module:
python -m reproducible_zip
How does it work?
There are four tricks to building a deterministic zip:
-
Files must be added to the zip in the same order.
rzipsorts all directories and files (with directories first) before adding them to the zip archive. -
Files in the zip must have consistent timestamps. The timestamp of files and directories is set to the minimum timestamp for zipfiles: 1980-01-01 00:00:00.
-
Files in the zip must have consistent permissions. All permission bits are set
-rwxrwxrwxfor files anddrwxrwxrwxfor directories. -
The "create system" for all files is set to "unix-like" (3) to ensure the correct intrepretation of the external_attrs/permissons.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reproducible_zip-0.2.0.tar.gz.
File metadata
- Download URL: reproducible_zip-0.2.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
203d4b13ce1e8daf77fe354a6f87dc826273555e5ceb0d95200358de75dbf4c6
|
|
| MD5 |
c3e7ddbc20477fdabb0bfa0e44aa34a3
|
|
| BLAKE2b-256 |
9bc7b863a3cbe5ae0681021e26a0fa350a2998f607e71b016baa31bf40e35282
|
File details
Details for the file reproducible_zip-0.2.0-py3-none-any.whl.
File metadata
- Download URL: reproducible_zip-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c8f03301515f9250802a1f042139fed6ef4ae0a3615c7913afe51c2690c385f
|
|
| MD5 |
ef46c152771d78468ea8589fba85bdf7
|
|
| BLAKE2b-256 |
3d52f8b0a8236e527014856b4d6523d2e263a17fe7a17ce8bbd1ac3cb2b2ad04
|