packages/lang/python/python/patches/012-add-support-source-date-epoch-pyc.patch
Alexandru Ardelean 2ef484615d python: update to version 2.7.15
This also updates pip and setuptools.
With this occasion, they also get PKG_RELEASEs of their own.

Dropped patch 011-remove-setupterm-definition.patch
Manually re-applied 005-fix-bluetooth-support.patch
Ran make package/python/refresh to refresh other patches.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
2018-05-03 14:46:12 +03:00

10 lines
442 B
Diff

--- a/Lib/py_compile.py
+++ b/Lib/py_compile.py
@@ -108,6 +108,7 @@ def compile(file, cfile=None, dfile=None
timestamp = long(os.fstat(f.fileno()).st_mtime)
except AttributeError:
timestamp = long(os.stat(file).st_mtime)
+ timestamp = long(os.getenv('SOURCE_DATE_EPOCH', timestamp))
codestring = f.read()
try:
codeobject = __builtin__.compile(codestring, dfile or file,'exec')