[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#32260] [PATCH 04/21] gnu: python: Build reproducibly.
From: |
Marius Bakke |
Subject: |
[bug#32260] [PATCH 04/21] gnu: python: Build reproducibly. |
Date: |
Tue, 24 Jul 2018 14:35:47 +0200 |
\o/
* gnu/packages/python.scm (python-3.7)[arguments]: Set PYTHONHASHSEED before
rebuilding all bytecode. Adjust regex so that lib2to3_ex.py gets compiled.
---
gnu/packages/python.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 395258aa9..7a42d9bc5 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -361,6 +361,9 @@ data types.")
(add-after 'remove-tests 'rebuild-bytecode
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
+ ;; Disable hash randomization to ensure the generated .pycs
+ ;; are reproducible.
+ (setenv "PYTHONHASHSEED" "0")
(for-each
(lambda (opt)
(format #t "Compiling with optimization level: ~a\n"
@@ -372,7 +375,7 @@ data types.")
"-m" "compileall"
"-f" ; force rebuild
;; Don't build lib2to3, because it's
Python 2 code.
- "-x" "lib2to3.*"
+ "-x" "lib2to3/.*"
,file)))
(find-files out "\\.py$")))
(list '() '("-O") '("-OO")))
--
2.18.0
- [bug#32260] [PATCH 00/21] Python updates, Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 00/21] Python updates, Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 03/21] gnu: python: Rebuild bytecode after removing tests., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 06/21] gnu: python-py: Update to 1.5.4., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 04/21] gnu: python: Build reproducibly.,
Marius Bakke <=
- [bug#32260] [PATCH 09/21] gnu: python-more-itertools: Update to 4.2.0., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 07/21] gnu: python-py: Update home page., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 12/21] gnu: python-pytest-runner: Update to 4.2., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 02/21] gnu: python: Update to 3.7.0., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 05/21] gnu: python-py: Add missing dependency on setuptools-scm., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 14/21] gnu: python-hypothesis: Update to 3.66.6., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 15/21] gnu: python-pytest-cov: Update to 2.5.1., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 18/21] gnu: python-pytest-mock: Update to 1.10.0., Marius Bakke, 2018/07/24
- [bug#32260] [PATCH 11/21] gnu: python-setuptools: Update to 40.0.0., Marius Bakke, 2018/07/24