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.
This commit is contained in:
parent
c5a05e3143
commit
5b4e2791ef
|
@ -167,6 +167,22 @@
|
||||||
;; gnu-build-system.scm.
|
;; gnu-build-system.scm.
|
||||||
(setenv "SOURCE_DATE_EPOCH" "1")
|
(setenv "SOURCE_DATE_EPOCH" "1")
|
||||||
#t))
|
#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
|
(add-before
|
||||||
'check 'pre-check
|
'check 'pre-check
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
Loading…
Reference in New Issue