Honor the 'SOURCE_DATE_EPOCH' environment variable to allow for determinitic builds. --- a/Lib/py_compile.py +++ b/Lib/py_compile.py @@ -105,7 +105,10 @@ def compile(file, cfile=None, dfile=None, doraise=False): """ with open(file, 'U') as f: try: - timestamp = long(os.fstat(f.fileno()).st_mtime) + if 'SOURCE_DATE_EPOCH' in os.environ: + timestamp = long(os.environ['SOURCE_DATE_EPOCH']) + else: + timestamp = long(os.fstat(f.fileno()).st_mtime) except AttributeError: timestamp = long(os.stat(file).st_mtime) codestring = f.read() diff --git a/Python/import.c b/Python/import.c index e47ce63..7eecf9c 100644 --- a/Python/import.c +++ b/Python/import.c @@ -945,6 +945,11 @@ write_compiled_module(PyCodeObject *co, char *cpathname, struct stat *srcstat, t /* Now write the true mtime (as a 32-bit field) */ fseek(fp, 4L, 0); assert(mtime <= 0xFFFFFFFF); + if (Py_GETENV("SOURCE_DATE_EPOCH") != NULL) { + const char *epoch = Py_GETENV("SOURCE_DATE_EPOCH"); + mtime = atoi(epoch); + } + PyMarshal_WriteLongToFile((long)mtime, fp, Py_MARSHAL_VERSION); fflush(fp); fclose(fp); ='/guix/log/gnu/packages/pcre.scm?showmsg=1'>logtreecommitdiff
path: root/gnu/packages/pcre.scm
AgeCommit message (Collapse)Author
2018-07-22gnu: pcre: Update to 8.42.Marius Bakke
* gnu/packages/pcre.scm (pcre): Update to 8.42.
2018-07-19gnu: pcre: Install static libraries to separate output.Marius Bakke
* gnu/packages/pcre.scm (pcre)[outputs]: Add "static". [arguments]: Add 'move-static-libs' phase.
2018-02-28gnu: pcre2: Update to 10.31.Tobias Geerinckx-Rice
* gnu/packages/pcre.scm (pcre2): Update to 10.31. [source]: Remove upstreamed patches. * gnu/packages/patches/pcre2-CVE-2017-7186.patch: Delete this file... * gnu/packages/patches/pcre2-CVE-2017-8786.patch: ...and this one. * gnu/local.mk (dist_patch_DATA): Remove them.
2018-01-19Merge branch 'master' into core-updatesMark H Weaver
2018-01-13gnu: pcre: Use HTTPS for home pages.Tobias Geerinckx-Rice
* gnu/packages/pcre.scm (pcre, pcre2)[home-page]: Use HTTPS.
2017-10-01gnu: pcre: Update to 8.41.Efraim Flashner
* gnu/packages/pcre.scm (pcre): Update to 8.41. [replacement]: Remove field. [source]: Remove patch. (pcre-8.41): Remove variable. * gnu/patches/pcre-CVE-2017-7186.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it.