diff options
author | Bernhard M. Wiedemann <bwiedemann@suse.de> | 2018-04-16 02:10:04 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-04-21 13:55:58 +0200 |
commit | 06700865e1324fc33ae864a5114900cfc7dce6f5 (patch) | |
tree | 8b51682546f26449d7d9ade34f5abb18c6bbf575 /wscript | |
parent | 728196c9d55100b63b74b2f118bd80d451636a6c (diff) | |
download | lv2-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-- | wscript | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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), |