summary refs log tree commit diff
path: root/doc/languages-frameworks/python.md
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2016-08-13 16:59:55 +0200
committerFranz Pletz <fpletz@fnordicwalking.de>2016-08-13 16:59:55 +0200
commitbd4490e2772ff80149dc9236873cfcbf1cb3f846 (patch)
treee08b232c3e346efaff4a549b855fae1feb919b47 /doc/languages-frameworks/python.md
parentfa3a35b241def2f837d72b5de736c513d6856cf9 (diff)
parent79149ac12d5009169900f027de2633a843e614f0 (diff)
Merge branch 'master' into hardened-stdenv
Diffstat (limited to 'doc/languages-frameworks/python.md')
-rw-r--r--doc/languages-frameworks/python.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/languages-frameworks/python.md b/doc/languages-frameworks/python.md
index 99fb6774b82b7..9bce49805174d 100644
--- a/doc/languages-frameworks/python.md
+++ b/doc/languages-frameworks/python.md
@@ -748,6 +748,23 @@ in newpkgs.python35.withPackages (ps: [ps.blaze])
 ```
 The requested package `blaze` depends upon `pandas` which itself depends on `scipy`.
 
+### `python setup.py bdist_wheel` cannot create .whl
+
+Executing `python setup.py bdist_wheel` 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.
+Fortunately `bdist_wheel` takes into account `SOURCE_DATE_EPOCH`. On Nix this value is set to 1. By setting it to a value correspond to 1980 or later it is possible to build wheels.
+
+Use 1980 as timestamp:
+```
+SOURCE_DATE_EPOCH=315532800 python3 setup.py bdist_wheel
+```
+or the current time:
+```
+SOURCE_DATE_EPOCH=$(date +%s) python3 setup.py bdist_wheel
+```
 
 ### `install_data` / `data_files` problems