gnu: python-rapidjson: Use pyproject-build-system.
* gnu/packages/python-web.scm (python-rapidjson)[build-system]: Use pyproject-build-system. [arguments]: Do not use custom 'build and 'check phases.
This commit is contained in:
parent
c77d5eaaf5
commit
23ca566e74
1 changed files with 15 additions and 17 deletions
|
@ -6168,24 +6168,22 @@ major web browsers.")
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet
|
(snippet
|
||||||
'(delete-file-recursively "rapidjson"))))
|
'(delete-file-recursively "rapidjson"))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:configure-flags
|
(list
|
||||||
(list (string-append "--rj-include-dir="
|
#:test-flags '(list "tests")
|
||||||
(assoc-ref %build-inputs "rapidjson")
|
#:phases
|
||||||
"/include/rapidjson"))
|
#~(modify-phases %standard-phases
|
||||||
#:phases
|
;; We cannot seem to use #:configure-flags with the
|
||||||
(modify-phases %standard-phases
|
;; pyproject-build-system to override rj_include_dir.
|
||||||
(replace 'build
|
(add-after 'unpack 'override-rapidjson-sources
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda _
|
||||||
(invoke "python" "setup.py" "build"
|
(substitute* "setup.py"
|
||||||
(string-append "--rj-include-dir="
|
(("^rj_include_dir =.*")
|
||||||
(assoc-ref %build-inputs "rapidjson")
|
(string-append "rj_include_dir = '"
|
||||||
"/include/rapidjson"))))
|
#$(this-package-native-input "rapidjson")
|
||||||
(replace 'check
|
"/include/rapidjson" "'"))
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(("if not os.path.isdir.*") "if False:")))))))
|
||||||
(when tests?
|
|
||||||
(invoke "python" "-m" "pytest" "tests")))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list rapidjson python-pytest python-pytz))
|
(list rapidjson python-pytest python-pytz))
|
||||||
(home-page "https://github.com/python-rapidjson/python-rapidjson")
|
(home-page "https://github.com/python-rapidjson/python-rapidjson")
|
||||||
|
|
Reference in a new issue