summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2018-03-22 07:29:55 +0100
committerGitHub <noreply@github.com>2018-03-22 07:29:55 +0100
commited879da1cc05bd6f88e333ddb34d30b039fc15d3 (patch)
tree681538af6820f399b6bd10d47564b706aa1341cb
parent64a1fd6c690113d0eda604bf57305911613e1c32 (diff)
parent319866ae11eddac6fa872429a739e9aec304bb0e (diff)
downloadnixlib-ed879da1cc05bd6f88e333ddb34d30b039fc15d3.tar
nixlib-ed879da1cc05bd6f88e333ddb34d30b039fc15d3.tar.gz
nixlib-ed879da1cc05bd6f88e333ddb34d30b039fc15d3.tar.bz2
nixlib-ed879da1cc05bd6f88e333ddb34d30b039fc15d3.tar.lz
nixlib-ed879da1cc05bd6f88e333ddb34d30b039fc15d3.tar.xz
nixlib-ed879da1cc05bd6f88e333ddb34d30b039fc15d3.tar.zst
nixlib-ed879da1cc05bd6f88e333ddb34d30b039fc15d3.zip
Merge pull request #37592 from giraffito/patch-3
python.md: fix grammar around bdist_wheel FAQ
-rw-r--r--doc/languages-frameworks/python.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md
index 039ca8545e9f..0f871395854c 100644
--- a/doc/languages-frameworks/python.md
+++ b/doc/languages-frameworks/python.md
@@ -871,8 +871,10 @@ Executing `python setup.py bdist_wheel` in a `nix-shell `fails with
 ```
 ValueError: ZIP does not support timestamps before 1980
 ```
-This is because files are included that depend on items in the Nix store which have a timestamp of, that is, it corresponds to January the 1st, 1970 at 00:00:00. And as the error informs you, ZIP does not support that.
-The command `bdist_wheel` takes into account `SOURCE_DATE_EPOCH`, and `nix-shell` sets this to 1. By setting it to a value corresponding to 1980 or later, or by unsetting it, it is possible to build wheels.
+
+This is because files from the Nix store (which have a timestamp of the UNIX epoch of January 1, 1970) are included in the .ZIP, but .ZIP archives follow the DOS convention of counting timestamps from 1980.
+
+The command `bdist_wheel` reads the `SOURCE_DATE_EPOCH` environment variable, which `nix-shell` sets to 1. Unsetting this variable or giving it a value corresponding to 1980 or later enables building wheels.
 
 Use 1980 as timestamp:
 ```shell
@@ -882,7 +884,7 @@ or the current time:
 ```shell
 nix-shell --run "SOURCE_DATE_EPOCH=$(date +%s) python3 setup.py bdist_wheel"
 ```
-or unset:
+or unset `SOURCE_DATE_EPOCH`:
 ```shell
 nix-shell --run "unset SOURCE_DATE_EPOCH; python3 setup.py bdist_wheel"
 ```