From afef6d080ef5eec5538e8924d37ab9eb12bc7d50 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Mon, 29 Mar 2021 12:52:56 +0200 Subject: [PATCH 03/10] build-system: python: Add #:disallowed-references. * gnu/build-system/python.scm (python-build)[disallowed-references]: Add support for #:disallowed-references. --- guix/build-system/python.scm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index 80895162f8..41cf0999f6 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -173,9 +173,13 @@ pre-defined variants." (guile #f) (imported-modules %python-build-system-modules) (modules '((guix build python-build-system) - (guix build utils)))) + (guix build utils))) + disallowed-references) "Build SOURCE using PYTHON, and with INPUTS. This assumes that SOURCE provides a 'setup.py' file as its build system." + (define specialized-canonicalize-reference + (cut canonicalize-reference store system <>)) + (define builder `(begin (use-modules ,@modules) @@ -212,7 +216,11 @@ provides a 'setup.py' file as its build system." #:system system #:modules imported-modules #:outputs outputs - #:guile-for-build guile-for-build)) + #:guile-for-build guile-for-build + #:disallowed-references + (and disallowed-references + (map specialized-canonicalize-reference + disallowed-references)))) (define python-build-system (build-system -- 2.31.1