From bb42c78a23a96ef79c2b5e3b98c55eef53eac9fe Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 1 Apr 2015 15:34:19 +0200 Subject: build-system: Factorize the list of modules imported on the build side. * guix/build-system/gnu.scm (%default-modules): Rename to... (%gnu-build-system-modules): ... this. (%default-modules): New variable. (dist-package, gnu-build): Use %GNU-BUILD-SYSTEM-MODULES for #:imported-modules. (gnu-cross-build): Likewise, and use %DEFAULT-MODULES for #:modules. * guix/build-system/cmake.scm (%cmake-build-system-modules): New variable. (cmake-build): Use it for #:imported-modules. * guix/build-system/glib-or-gtk.scm (%default-imported-modules): Rename to... (%glib-or-gtk-build-system-modules): ... this. Refer to %GNU-BUILD-SYSTEM-MODULES. Adjust uses. * guix/build-system/perl.scm (%perl-build-system-modules): New variable. (perl-build): Use it for #:imported-modules. * guix/build-system/python.scm (%python-build-system-modules): New variable. (python-build): Use it for #:imported-modules. * guix/build-system/ruby.scm (%ruby-build-system-modules): New variable. (ruby-build): Use it for #:imported-modules. * guix/build-system/waf.scm (%waf-build-system-modules): New variable. (waf-build): Use it for #:imported-modules. --- guix/build-system/python.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'guix/build-system/python.scm') diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index 37108650d0..d498cf618b 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -27,7 +27,8 @@ (define-module (guix build-system python) #:use-module (guix build-system gnu) #:use-module (ice-9 match) #:use-module (srfi srfi-26) - #:export (package-with-python2 + #:export (%python-build-system-modules + package-with-python2 python-build python-build-system)) @@ -38,6 +39,11 @@ (define-module (guix build-system python) ;; ;; Code: +(define %python-build-system-modules + ;; Build-side modules imported by default. + `((guix build python-build-system) + ,@%gnu-build-system-modules)) + (define (default-python) "Return the default Python package." ;; Lazily resolve the binding to avoid a circular dependency. @@ -132,9 +138,7 @@ (define* (python-build store name inputs (search-paths '()) (system (%current-system)) (guile #f) - (imported-modules '((guix build python-build-system) - (guix build gnu-build-system) - (guix build utils))) + (imported-modules %python-build-system-modules) (modules '((guix build python-build-system) (guix build utils)))) "Build SOURCE using PYTHON, and with INPUTS. This assumes that SOURCE -- cgit v1.2.3