diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index 86efc1a715..9a80bd6799 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -101,14 +101,11 @@ NEW-PREFIX; otherwise, NEW-PREFIX is prepended to the name." (string-length old-prefix)) name)))) (arguments - (let ((arguments (package-arguments p)) - (python (if (promise? python) - (force python) - python))) - (if (member #:python arguments) - (substitute-keyword-arguments arguments - ((#:python p) python)) - (append arguments `(#:python ,python))))) + (let ((python (if (promise? python) + (force python) + python))) + (ensure-keyword-arguments (package-arguments p) + `(#:python ,python)))) (inputs (map rewrite (package-inputs p))) (propagated-inputs (map rewrite (package-propagated-inputs p))) (native-inputs (map rewrite (package-native-inputs p))))