[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/24: gnu: python: Build reproducibly.
From: |
Marius Bakke |
Subject: |
08/24: gnu: python: Build reproducibly. |
Date: |
Sat, 28 Jul 2018 09:58:17 -0400 (EDT) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit a422e2478e695bd1211fda827c767134de39fb2c
Author: Marius Bakke <address@hidden>
Date: Mon Jul 23 20:53:50 2018 +0200
gnu: python: Build reproducibly.
\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 3d924f7..6cab847 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")))
- branch core-updates updated (1428bce -> 4696368), Marius Bakke, 2018/07/28
- 01/24: gnu: openldap: Don't build static libraries., Marius Bakke, 2018/07/28
- 02/24: gnu: icu4c: Don't keep a reference to coreutils., Marius Bakke, 2018/07/28
- 04/24: gnu: libxml2: Add explicit dependency on XZ., Marius Bakke, 2018/07/28
- 03/24: gnu: libxml2: Move static library to separate output., Marius Bakke, 2018/07/28
- 08/24: gnu: python: Build reproducibly.,
Marius Bakke <=
- 10/24: gnu: python-py: Update to 1.5.4., Marius Bakke, 2018/07/28
- 11/24: gnu: python-py: Update home page., Marius Bakke, 2018/07/28
- 17/24: gnu: python-flake8: Update to 3.5.0., Marius Bakke, 2018/07/28
- 07/24: gnu: python: Rebuild bytecode after removing tests., Marius Bakke, 2018/07/28
- 05/24: gnu: python: Remove outdated comment and phases., Marius Bakke, 2018/07/28
- 06/24: gnu: python: Update to 3.7.0., Marius Bakke, 2018/07/28
- 12/24: gnu: python-pyflakes: Update to 2.0.0., Marius Bakke, 2018/07/28
- 13/24: gnu: python-more-itertools: Update to 4.2.0., Marius Bakke, 2018/07/28
- 19/24: gnu: python-pytest-cov: Update to 2.5.1., Marius Bakke, 2018/07/28
- 24/24: gnu: python-fonttools: Update to 3.28.0., Marius Bakke, 2018/07/28