gnu: python-orjson: Reuse phases from pyproject-build-system.
* gnu/packages/python-xyz.scm (python-orjson)[arguments]: Include modules from pyproject-build-system; use their 'build and 'install phases instead of duplicating their contents.master
parent
27341afe53
commit
351d193eb1
|
@ -2827,9 +2827,14 @@ help formatter.")
|
||||||
(build-system cargo-build-system)
|
(build-system cargo-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
#:imported-modules `(,@%cargo-build-system-modules
|
||||||
|
,@%pyproject-build-system-modules)
|
||||||
|
#:modules '((guix build cargo-build-system)
|
||||||
|
((guix build pyproject-build-system) #:prefix py:)
|
||||||
|
(guix build utils))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'install 'build-python-module
|
(add-after 'install 'prepare-python-module
|
||||||
(lambda _
|
(lambda _
|
||||||
;; We don't use maturin.
|
;; We don't use maturin.
|
||||||
(delete-file "pyproject.toml")
|
(delete-file "pyproject.toml")
|
||||||
|
@ -2857,15 +2862,11 @@ exclude =
|
||||||
integration
|
integration
|
||||||
test
|
test
|
||||||
Cargo.toml
|
Cargo.toml
|
||||||
" #$version)))
|
" #$version)))))
|
||||||
;; ZIP does not support timestamps before 1980.
|
(add-after 'prepare-python-module 'build-python-module
|
||||||
(setenv "SOURCE_DATE_EPOCH" "315532800")
|
(assoc-ref py:%standard-phases 'build))
|
||||||
(invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
|
|
||||||
(add-after 'build-python-module 'install-python-module
|
(add-after 'build-python-module 'install-python-module
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(assoc-ref py:%standard-phases 'install))
|
||||||
(let ((whl (car (find-files "dist" "\\.whl$"))))
|
|
||||||
(invoke "pip" "--no-cache-dir" "--no-input"
|
|
||||||
"install" "--no-deps" "--prefix" #$output whl))))
|
|
||||||
(add-after 'install-python-module 'install-python-library
|
(add-after 'install-python-module 'install-python-library
|
||||||
(lambda _
|
(lambda _
|
||||||
(let ((site (string-append #$output "/lib/python"
|
(let ((site (string-append #$output "/lib/python"
|
||||||
|
|
Reference in New Issue