gnu: commencement: Decouple python-boot0 from python.
* gnu/packages/commencement.scm (python-boot0)[arguments]: Do not use SUBSTITUTE-KEYWORD-ARGUMENTS to make it easier to change Python without a full bootstrap.master
parent
b8a1b697b4
commit
053677ba3b
|
@ -6,7 +6,7 @@
|
||||||
;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
|
;;; Copyright © 2017, 2018, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
|
||||||
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
;;; Copyright © 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||||
;;; Copyright © 2019, 2020 Marius Bakke <mbakke@fastmail.com>
|
;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
|
||||||
;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
|
;;; Copyright © 2020 Timothy Sample <samplet@ngyro.com>
|
||||||
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
|
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
|
||||||
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
|
@ -3123,48 +3123,38 @@ memoized as a function of '%current-system'."
|
||||||
(arguments
|
(arguments
|
||||||
`(#:implicit-inputs? #f
|
`(#:implicit-inputs? #f
|
||||||
#:guile ,%bootstrap-guile
|
#:guile ,%bootstrap-guile
|
||||||
|
;; Running the tests won't work because we lack several required
|
||||||
,@(substitute-keyword-arguments (package-arguments python-minimal)
|
;; modules (OpenSSL, etc).
|
||||||
;; Disable features that cannot be built at this stage.
|
#:tests? #f
|
||||||
((#:configure-flags _ ''())
|
;; Disable features that cannot be built at this stage.
|
||||||
`(list "--without-ensurepip"
|
#:configure-flags '("--without-ensurepip" "--without-threads")
|
||||||
"--without-threads"))
|
#:phases
|
||||||
;; Clear #:make-flags, such that changes to the regular
|
(modify-phases %standard-phases
|
||||||
;; Python package won't interfere with this one.
|
(add-before 'configure 'patch-lib-shells
|
||||||
((#:make-flags _ ''()) ''())
|
(lambda _
|
||||||
((#:phases phases)
|
(substitute* '("Lib/subprocess.py"
|
||||||
;; Remove the 'apply-alignment-patch' phase if present to avoid
|
"Lib/distutils/tests/test_spawn.py"
|
||||||
;; rebuilding this package. TODO: for the next rebuild cycle,
|
"Lib/test/support/__init__.py"
|
||||||
;; consider inlining all the arguments instead of inheriting to
|
"Lib/test/test_subprocess.py")
|
||||||
;; make it easier to patch Python without risking a full rebuild.
|
(("/bin/sh") (which "sh")))))
|
||||||
;; Or better yet, change to 'python-on-guile'.
|
(add-before 'configure 'disable-modules
|
||||||
`(modify-phases ,@(list (match phases
|
(lambda _
|
||||||
(('modify-phases original-phases
|
(substitute* "setup.py"
|
||||||
changes ...
|
;; Disable ctypes, since it requires libffi.
|
||||||
('add-after unpack apply-alignment-patch _))
|
(("extensions\\.append\\(ctypes\\)") "")
|
||||||
`(modify-phases ,original-phases ,@changes))
|
;; Prevent the 'ossaudiodev' extension from being
|
||||||
(_ phases)))
|
;; built, since it requires Linux headers.
|
||||||
(delete 'remove-windows-binaries)
|
(("'linux', ") ""))))
|
||||||
(add-before 'configure 'disable-modules
|
,@(if (hurd-system?)
|
||||||
(lambda _
|
`((add-before 'build 'fix-regen
|
||||||
(substitute* "setup.py"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
;; Disable ctypes, since it requires libffi.
|
(let ((libc (assoc-ref inputs "libc")))
|
||||||
(("extensions\\.append\\(ctypes\\)") "")
|
(substitute* "Lib/plat-generic/regen"
|
||||||
;; Prevent the 'ossaudiodev' extension from being
|
(("/usr/include/")
|
||||||
;; built, since it requires Linux headers.
|
(string-append libc "/include/")))))))
|
||||||
(("'linux', ") ""))))
|
'())
|
||||||
(delete 'set-TZDIR)
|
(add-after 'install 'install-sitecustomize.py
|
||||||
,@(if (hurd-system?)
|
,(customize-site version)))))
|
||||||
`((add-before 'build 'fix-regen
|
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
|
||||||
(let ((libc (assoc-ref inputs "libc")))
|
|
||||||
(substitute* "Lib/plat-generic/regen"
|
|
||||||
(("/usr/include/")
|
|
||||||
(string-append libc "/include/")))))))
|
|
||||||
'())
|
|
||||||
(replace 'install-sitecustomize.py
|
|
||||||
,(customize-site version))))
|
|
||||||
((#:tests? _ #f) #f))))
|
|
||||||
(native-search-paths
|
(native-search-paths
|
||||||
(list (guix-pythonpath-search-path version)))))
|
(list (guix-pythonpath-search-path version)))))
|
||||||
|
|
||||||
|
|
Reference in New Issue