From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhwYu-0005p4-Ks for guix-patches@gnu.org; Tue, 24 Jul 2018 08:37:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhwYq-0006gG-KX for guix-patches@gnu.org; Tue, 24 Jul 2018 08:37:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49784) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhwYq-0006g9-G2 for guix-patches@gnu.org; Tue, 24 Jul 2018 08:37:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fhwYq-0000hr-95 for guix-patches@gnu.org; Tue, 24 Jul 2018 08:37:04 -0400 Subject: [bug#32260] [PATCH 04/21] gnu: python: Build reproducibly. Resent-Message-ID: From: Marius Bakke Date: Tue, 24 Jul 2018 14:35:47 +0200 Message-Id: <20180724123604.29666-5-mbakke@fastmail.com> In-Reply-To: <20180724123604.29666-1-mbakke@fastmail.com> References: <20180724123604.29666-1-mbakke@fastmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32260@debbugs.gnu.org \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