File: 0002-Reproducible-build.patch

package info (click to toggle)
pyorbital 1.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 664 kB
  • sloc: python: 3,676; makefile: 89; javascript: 6
file content (33 lines) | stat: -rw-r--r-- 929 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From: Chris Lamb <lamby@debian.org>
Date: Sat, 7 Dec 2024 10:48:29 +0000
Subject: Make the build reproducible

Last-Update: 2024-12-04
Forwarded: not-needed
---
 doc/source/conf.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/doc/source/conf.py b/doc/source/conf.py
index 0ed1f15..c2a9762 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -12,7 +12,7 @@
 # serve to show the default.
 """Configurations for sphinx based documentation."""
 
-import datetime as dt
+import time
 import os
 import sys
 
@@ -47,7 +47,8 @@ master_doc = "index"
 
 # General information about the project.
 project = u"pyorbital"
-copyright = u"2012, 2024-{}, The PyTroll Team".format(dt.datetime.utcnow().strftime("%Y"))  # noqa: A001
+year = time.strftime("%Y", time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
+copyright = u"2012, 2024-{}, The PyTroll Team".format(year)  # noqa: A001