[Reproducible-builds] Bug#824266: mkdocs: Please support SOURCE_DATE_EPOCH specification for build time stamps [origin: bam at debian.org]

Alexis Bienvenüe pado at passoire.fr
Fri May 20 21:11:53 UTC 2016


Le 20/05/2016 22:47, Reiner Herrmann a écrit :
> On Wed, May 18, 2016 at 12:16:10PM +0200, Axel Beckert wrote:
>> could someone more python-savvy than me have a look at this claim that
>> our SOURCE_DATE_EPOCH example for Python on
>> https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Examples
>> is wrong.

When S_D_E is not set, time.gmtime() returns a struct_time that can't be
converted to int:

>>>
datetime.datetime.utcfromtimestamp(int(os.environ.get('SOURCE_DATE_EPOCH',
time.gmtime())))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: int() argument must be a string or a number, not
'time.struct_time'

Maybe we should use time.time() instead.

Regards,
Alexis Bienvenüe.



More information about the Reproducible-builds mailing list