summaryrefslogtreecommitdiff
path: root/guix/build-system/python.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-03-18 18:11:02 +0100
committerLudovic Courtès <ludo@gnu.org>2015-03-18 18:11:02 +0100
commit381c540b937a5e6e8b7007c9c0271ee816bf5417 (patch)
tree27191f25f05bbfd48dbf47bbd29f72cb7521482f /guix/build-system/python.scm
parent49689377a3bab8da08436455ca14a0432fa0e95f (diff)
parentf401b1e9934a6594d6d7586922aa987e0b24839b (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/build-system/python.scm')
-rw-r--r--guix/build-system/python.scm13
1 files changed, 10 insertions, 3 deletions
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm
index e8af9f8146..37108650d0 100644
--- a/guix/build-system/python.scm
+++ b/guix/build-system/python.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;;
@@ -76,7 +76,10 @@ prepended to the name."
(substring name (string-length old-prefix))
name))))
(arguments
- (let ((arguments (package-arguments p)))
+ (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)))))
@@ -86,7 +89,11 @@ prepended to the name."
p)))
(define package-with-python2
- (cut package-with-explicit-python <> (default-python2) "python-" "python2-"))
+ ;; Note: delay call to 'default-python2' until after the 'arguments' field
+ ;; of packages is accessed to avoid a circular dependency when evaluating
+ ;; the top-level of (gnu packages python).
+ (cut package-with-explicit-python <> (delay (default-python2))
+ "python-" "python2-"))
(define* (lower name
#:key source inputs native-inputs outputs system target