aboutsummaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorBernhard M. Wiedemann <bwiedemann@suse.de>2018-04-16 02:10:04 +0200
committerDavid Robillard <d@drobilla.net>2018-04-21 13:55:58 +0200
commit06700865e1324fc33ae864a5114900cfc7dce6f5 (patch)
tree8b51682546f26449d7d9ade34f5abb18c6bbf575 /wscript
parent728196c9d55100b63b74b2f118bd80d451636a6c (diff)
downloadlv2-06700865e1324fc33ae864a5114900cfc7dce6f5.tar.xz
Allow build date to be overridden for reproducible documentation
See https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable.
Diffstat (limited to 'wscript')
-rw-r--r--wscript4
1 files changed, 3 insertions, 1 deletions
diff --git a/wscript b/wscript
index 7236286..1e3c8af 100644
--- a/wscript
+++ b/wscript
@@ -184,7 +184,9 @@ def build_index(task):
if date is None:
import datetime
- date = datetime.datetime.now().isoformat()
+ import time
+ now = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
+ date = datetime.datetime.utcfromtimestamp(now).strftime('%F')
subst_file(task.inputs[0].abspath(), task.outputs[0].abspath(),
{ '@ROWS@': ''.join(rows),