mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 22:08:16 -05:00
gnu: python: Do not retain references to build tools.
* gnu/packages/python.scm (python-2)[arguments]: Add 'do-not-record-configure-flags' and 'do-not-record-configure-flags-in-makefile' phases.
This commit is contained in:
parent
42e735dfc7
commit
14f8dae6b1
1 changed files with 18 additions and 0 deletions
|
@ -174,6 +174,24 @@ (define-public python-2
|
||||||
"Lib/test/test_subprocess.py"))
|
"Lib/test/test_subprocess.py"))
|
||||||
(("/bin/sh") (which "sh")))
|
(("/bin/sh") (which "sh")))
|
||||||
#t))
|
#t))
|
||||||
|
(add-before
|
||||||
|
'install 'do-not-record-configure-flags
|
||||||
|
(lambda _
|
||||||
|
;; Remove configure flags from '_sysconfigdata.py' so we don't
|
||||||
|
;; end up keeping references to the build tools.
|
||||||
|
(substitute* (find-files "." "sysconfigdata\\.py$")
|
||||||
|
(("'CONFIG_ARGS':.*")
|
||||||
|
"'CONFIG_ARGS': \"\",\n"))
|
||||||
|
#t))
|
||||||
|
(add-after
|
||||||
|
'install 'do-not-record-configure-flags-in-makefile
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
;; Likewise.
|
||||||
|
(let ((out (assoc-ref outputs "out")))
|
||||||
|
(substitute* (find-files out "^Makefile$")
|
||||||
|
(("^CONFIG_ARGS[[:blank:]]*=.*$")
|
||||||
|
"CONFIG_ARGS =\n"))
|
||||||
|
#t)))
|
||||||
(add-before
|
(add-before
|
||||||
'check 'pre-check
|
'check 'pre-check
|
||||||
(lambda _
|
(lambda _
|
||||||
|
|
Loading…
Reference in a new issue