diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-11-15 17:51:12 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-29 22:59:28 +0100 |
commit | 5b4e2791ef898a5fd43388b8020377b5d7bda771 (patch) | |
tree | dd231cfd1344fe49536561b0cc1020629d662c78 | |
parent | c5a05e31437d640647b5aa1dd70917149bb3f1a3 (diff) | |
download | gnu-guix-5b4e2791ef898a5fd43388b8020377b5d7bda771.tar gnu-guix-5b4e2791ef898a5fd43388b8020377b5d7bda771.tar.gz |
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.
-rw-r--r-- | 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 fd3e6b312b..6cae1324a0 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 _ |