aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-05-13 11:02:08 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-05-13 11:03:52 +0200
commit23ca566e746da7f83d565137e2bb1c9f95cfdd65 (patch)
tree16f687654d8f4bc9762810dc4fb0ec8f6b0ed729 /gnu/packages
parentc77d5eaaf5ecdfdf8a8444f7cee18f8971338b68 (diff)
downloadguix-23ca566e746da7f83d565137e2bb1c9f95cfdd65.tar
guix-23ca566e746da7f83d565137e2bb1c9f95cfdd65.tar.gz
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.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-web.scm32
1 files changed, 15 insertions, 17 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 1e893723a7..dbd6e98730 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -6168,24 +6168,22 @@ major web browsers.")
(modules '((guix build utils)))
(snippet
'(delete-file-recursively "rapidjson"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:configure-flags
- (list (string-append "--rj-include-dir="
- (assoc-ref %build-inputs "rapidjson")
- "/include/rapidjson"))
- #:phases
- (modify-phases %standard-phases
- (replace 'build
- (lambda* (#:key inputs #:allow-other-keys)
- (invoke "python" "setup.py" "build"
- (string-append "--rj-include-dir="
- (assoc-ref %build-inputs "rapidjson")
- "/include/rapidjson"))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "python" "-m" "pytest" "tests")))))))
+ (list
+ #:test-flags '(list "tests")
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; We cannot seem to use #:configure-flags with the
+ ;; pyproject-build-system to override rj_include_dir.
+ (add-after 'unpack 'override-rapidjson-sources
+ (lambda _
+ (substitute* "setup.py"
+ (("^rj_include_dir =.*")
+ (string-append "rj_include_dir = '"
+ #$(this-package-native-input "rapidjson")
+ "/include/rapidjson" "'"))
+ (("if not os.path.isdir.*") "if False:")))))))
(native-inputs
(list rapidjson python-pytest python-pytz))
(home-page "https://github.com/python-rapidjson/python-rapidjson")