I have been careful to set and check the value of SOURCE_DATE_EPOCH, following Section 15.25.3.3 of the manual. This doesn’t really seem to help, as I’m still getting the error about dates before 1980.
$ nix-shell
[nix-shell:~/src/gspack]$ source .venv/bin/activate
(.venv) [nix-shell:~/src/gspack]$
(.venv) [nix-shell:~/src/gspack]$ pip install -r requirements.txt
...
ValueError: ZIP does not support timestamps before 1980
WARNING: You are using pip version 21.1.3; however, version 21.3.1 is available.
You should consider upgrading via the '/Users/jack/src/gspack/.venv/bin/python -m pip install --upgrade pip' command.
(.venv) [nix-shell:~/src/gspack]$ echo $SOURCE_DATE_EPOCH
# (it's unset)
(.venv) [nix-shell:~/src/gspack]$
I’m running MacOS Monterey 12.0.1, on an M1 chip. Any other suggestions? Thank you!
When .zip installers are downloaded with Nix from PyPI they get set a 0 timestamp for reproducibility reasons. Unfortunately in Python37 the zip module cannot deal with that and raises such ValueError. A few solutions: