mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 14:40:51 +01:00
Allow to override build date
in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable.
This commit is contained in:
parent
01e4427057
commit
cd8ad1edb6
5
setup.py
5
setup.py
@ -62,8 +62,9 @@ except:
|
|||||||
if os.path.isfile(VERSION_FILE):
|
if os.path.isfile(VERSION_FILE):
|
||||||
from src.version import version
|
from src.version import version
|
||||||
else:
|
else:
|
||||||
from time import gmtime, strftime
|
from time import gmtime, strftime, time
|
||||||
version = 'installed on ' + strftime("%Y-%m-%dT%H-%M-%S", gmtime())
|
t = int(os.environ.get('SOURCE_DATE_EPOCH', time()))
|
||||||
|
version = 'installed on ' + strftime("%Y-%m-%dT%H-%M-%S", gmtime(t))
|
||||||
try:
|
try:
|
||||||
os.unlink(VERSION_FILE)
|
os.unlink(VERSION_FILE)
|
||||||
except OSError: # Does not exist
|
except OSError: # Does not exist
|
||||||
|
Loading…
x
Reference in New Issue
Block a user