Matej Cepl
ca334cc307
adding reproducibility patches from gh#python/cpython!121872 and gh#python/cpython!121883. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python310?expand=0&rev=140
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From ac2b8869724d7a57d9b5efbdce2f20423214e8bb Mon Sep 17 00:00:00 2001
|
|
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
|
|
Date: Tue, 16 Jul 2024 21:39:33 +0200
|
|
Subject: [PATCH] Allow to override build date with SOURCE_DATE_EPOCH
|
|
|
|
to make builds reproducible.
|
|
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.
|
|
---
|
|
Doc/conf.py | 3 ++-
|
|
Doc/library/functions.rst | 2 +-
|
|
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
--- a/Doc/conf.py
|
|
+++ b/Doc/conf.py
|
|
@@ -89,7 +89,8 @@ html_short_title = '%s Documentation' %
|
|
|
|
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
|
# using the given strftime format.
|
|
-html_last_updated_fmt = '%b %d, %Y'
|
|
+html_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
|
|
+html_last_updated_fmt = time.strftime('%b %d, %Y (%H:%M UTC)', time.gmtime(html_time))
|
|
|
|
# Path to find HTML templates.
|
|
templates_path = ['tools/templates']
|
|
--- a/Doc/library/functions.rst
|
|
+++ b/Doc/library/functions.rst
|
|
@@ -1320,7 +1320,7 @@ are always available. They are listed h
|
|
(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:`tempfile`,
|
|
and :mod:`shutil`.
|
|
|
|
- .. audit-event:: open file,mode,flags open
|
|
+ .. audit-event:: open path,mode,flags open
|
|
|
|
The ``mode`` and ``flags`` arguments may have been modified or inferred from
|
|
the original call.
|