Bug#832997: pysal: please make the build reproducible
    Chris Lamb 
    lamby at debian.org
       
    Sat Jul 30 17:42:26 UTC 2016
    
    
  
Sebastiaan wrote:
> No. From your original patch:
>  +            int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
time.time() as the second argument to dict.get is the fallback
mechanism.
>  +                int(os.environ.get('SOURCE_DATE_EPOCH', time.time())),
.. which then somewhat pointless in your patch.
If you prefer the more explicit form, I would actually recommend:
    try:
        now = datetime.datetime.utctimestamp(
             int(os.environ['SOURCE_DATE_EPOCH']),
        )
    except KeyError:
        now = datetime.datetime.now()
As that removes the ugly duplicate reference to 'SOURCE_DATE_EPOCH'.
Regards,
-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
    
    
More information about the Pkg-grass-devel
mailing list