Create reproducible archives
./reproducible.py -d dir_to_archive -o archive.tar.gz \
--prepend RepoName-master --timestamp 1414213562
First, get a .tar.gz file
-
GitHub users: download the archive using the green button or from the Release section.
-
Git users:
git archive --format=tar.gz --prefix=topfolder/ -o out.tar.gz master
orv1.2.3
-
PyPI users:
python3 setup.py sdist
Extract the archive, stripping the top folder
mkdir out_dir
tar -xf out.tar.gz -C out_dir --strip 1
Pack the archive, deterministically
./reproducible.py -d out_dir -o archive.tar.gz --prepend RepoName-master
Check your timestamps! Python uses the zipfile
module to build wheels, and it has trouble dealing with pre-1980 timestamps.