about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2016-08-13 14:18:59 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2016-08-13 14:19:33 +0200
commit6f1551d597f44477980043d00193fe48f3a82251 (patch)
tree4478e0cc9c4246c30e7b198cbd06fec6fd5755a1 /doc
parent49222660fc70a3cf27b67368afae96b691ec7260 (diff)
Doc: how to create a Python wheel
Diffstat (limited to 'doc')
-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 6f5054c177b63..bb1094e2b741b 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