A new user interface for you! Read more...

File 0001-bpo-29708-support-SOURCE_DATE_EPOCH-env-var-in-boots.patch of Package python3

From 1004fbe34efd63f0665172c758e3d2213458cbae Mon Sep 17 00:00:00 2001
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
Date: Mon, 20 Mar 2017 04:40:38 +0100
Subject: [PATCH] bpo-29708: support SOURCE_DATE_EPOCH env var in
 bootstrap_external

See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Background:
In some distributions like openSUSE, binary rpms contain precompiled .pyc files.
---
 Lib/importlib/_bootstrap_external.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Lib/importlib/_bootstrap_external.py b/Lib/importlib/_bootstrap_external.py
index ec528b2..587cc35 100644
--- a/Lib/importlib/_bootstrap_external.py
+++ b/Lib/importlib/_bootstrap_external.py
@@ -20,6 +20,8 @@ work. One should use importlib as the public-facing version of this module.
 # reference any injected objects! This includes not only global code but also
 # anything specified at the class level.
 
+import 'os'
+
 # Bootstrap-related code ######################################################
 _CASE_INSENSITIVE_PLATFORMS_STR_KEY = 'win',
 _CASE_INSENSITIVE_PLATFORMS_BYTES_KEY = 'cygwin', 'darwin'
@@ -783,6 +785,10 @@ class SourceLoader(_LoaderBasics):
         _bootstrap._verbose_message('code object from {}', source_path)
         if (not sys.dont_write_bytecode and bytecode_path is not None and
                 source_mtime is not None):
+            sde = os.environ.get('SOURCE_DATE_EPOCH')
+            if sde and source_mtime > int(sde):
+                source_mtime = int(sde)
+                os.utime(source_path, (source_mtime, source_mtime))
             data = _code_to_bytecode(code_object, source_mtime,
                     len(source_bytes))
             try:
-- 
2.10.2