summaryrefslogtreecommitdiff
path: root/lang/python/python3
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python/python3')
-rw-r--r--lang/python/python3/Makefile2
-rw-r--r--lang/python/python3/patches/012-add-support-source-date-epoch-pyc.patch13
2 files changed, 14 insertions, 1 deletions
diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile
index 924fec58f..b5d9cf46f 100644
--- a/lang/python/python3/Makefile
+++ b/lang/python/python3/Makefile
@@ -16,7 +16,7 @@ PYTHON_VERSION_MICRO:=$(PYTHON3_VERSION_MICRO)
PKG_NAME:=python3
# XXX: reset PKG_RELEASE to 1 only if Python's pip & setuptools versions have also bumped;
# otherwise, keep bumping PKG_RELEASE
-PKG_RELEASE:=11
+PKG_RELEASE:=12
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
diff --git a/lang/python/python3/patches/012-add-support-source-date-epoch-pyc.patch b/lang/python/python3/patches/012-add-support-source-date-epoch-pyc.patch
new file mode 100644
index 000000000..4c2c2f7cd
--- /dev/null
+++ b/lang/python/python3/patches/012-add-support-source-date-epoch-pyc.patch
@@ -0,0 +1,13 @@
+--- a/Lib/py_compile.py
++++ b/Lib/py_compile.py
+@@ -137,8 +137,9 @@ def compile(file, cfile=None, dfile=None
+ except FileExistsError:
+ pass
+ source_stats = loader.path_stats(file)
++ mtime = int(os.getenv('SOURCE_DATE_EPOCH', source_stats['mtime']))
+ bytecode = importlib._bootstrap_external._code_to_bytecode(
+- code, source_stats['mtime'], source_stats['size'])
++ code, mtime, source_stats['size'])
+ mode = importlib._bootstrap_external._calc_mode(file)
+ importlib._bootstrap_external._write_atomic(cfile, bytecode, mode)
+ return cfile