gnu: python: Remove unnecessary files.

* gnu/packages/python.scm (python2)[arguments]: Remove files built
during the test phase.
(python3)[arguments]: Also remove windows binaries shipped with the
sources.
This commit is contained in:
Julien Lepiller 2021-03-17 13:33:22 +01:00
parent eda6a95d9d
commit 20d52562e5
No known key found for this signature in database
GPG key ID: 53D457B2D636EE82
2 changed files with 41 additions and 3 deletions

View file

@ -11,6 +11,7 @@
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2021 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@ -3091,7 +3092,12 @@ memoized as a function of '%current-system'."
(delete-file-recursively "Modules/expat")
(substitute* "Modules/Setup.dist"
;; Link Expat instead of embedding the bundled one.
(("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n")))))))
(("^#pyexpat.*") "pyexpat pyexpat.c -lexpat\n"))
;; Delete windows binaries
(for-each delete-file
(find-files "Lib/distutils/command" ".*.exe$"))
(for-each delete-file
(find-files "Lib/ensurepip" ".*.whl$")))))))
(inputs
`(,@(%boot0-inputs)
("expat" ,expat-sans-tests))) ;remove OpenSSL, zlib, etc.
@ -3122,6 +3128,7 @@ memoized as a function of '%current-system'."
('add-after unpack apply-alignment-patch _))
`(modify-phases ,original-phases ,@changes))
(_ phases)))
(delete 'remove-windows-binaries)
(add-before 'configure 'disable-modules
(lambda _
(substitute* "setup.py"