[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/09: gnu: python: Do not record configure flags.
From: |
Ludovic Courtès |
Subject: |
07/09: gnu: python: Do not record configure flags. |
Date: |
Sun, 29 Nov 2015 22:01:56 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 5b4e2791ef898a5fd43388b8020377b5d7bda771
Author: Ludovic Courtès <address@hidden>
Date: Sun Nov 15 17:51:12 2015 +0100
gnu: python: Do not record configure flags.
This reduces the number of run-time dependencies of python-2 from 25 to
15, corresponding only to ~4 MiB.
* gnu/packages/python.scm (python-2)[arguments]: Add
'do-not-record-configure-flags' phase.
---
gnu/packages/python.scm | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index fd3e6b3..6cae132 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -167,6 +167,22 @@
;; gnu-build-system.scm.
(setenv "SOURCE_DATE_EPOCH" "1")
#t))
+ (add-before 'configure 'do-not-record-configure-flags
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ ;; Remove configure flags from the installed '_sysconfigdata.py'
+ ;; and 'Makefile' so we don't end up keeping references to the
+ ;; build tools.
+ ;;
+ ;; Preserve at least '--with-system-ffi' since otherwise the
+ ;; thing tries to build libffi, fails, and we end up with a
+ ;; Python that lacks ctypes.
+ (substitute* "configure"
+ (("^CONFIG_ARGS=.*$")
+ (format #f "CONFIG_ARGS='~a'\n"
+ (if (member "--with-system-ffi" configure-flags)
+ "--with-system-ffi"
+ ""))))
+ #t))
(add-before
'check 'pre-check
(lambda _
- branch master updated (2605975 -> 02f0c3b), Ludovic Courtès, 2015/11/29
- 01/09: tk: Hardcode path to TK_LIBRARY., Ludovic Courtès, 2015/11/29
- 04/09: gnu: python: Set SOURCE_DATE_EPOCH to 1 instead of 0., Ludovic Courtès, 2015/11/29
- 02/09: gnu: tcl: Produce 'tclIndex' files deterministically., Ludovic Courtès, 2015/11/29
- 03/09: gnu: python-2: Honor 'SOURCE_DATE_EPOCH'., Ludovic Courtès, 2015/11/29
- 09/09: gnu: python: Move tkinter to "tk" output., Ludovic Courtès, 2015/11/29
- 06/09: gnu: python: Factorize configure flags with minimal variants., Ludovic Courtès, 2015/11/29
- 05/09: gnu: python: Make 'sys.version' deterministic., Ludovic Courtès, 2015/11/29
- 07/09: gnu: python: Do not record configure flags.,
Ludovic Courtès <=
- 08/09: gnu: python: Clarify and shorten the list of built-time modules., Ludovic Courtès, 2015/11/29