~ruther/guix-local

5282181d51202648d086f1f37c293dd03eee565f — Ludovic Courtès 12 years ago cf5d2ca
build-system/python: Avoid circular dependency.

This fixes a circular dependency introduced in commit acc26ff ("gnu: Add
pytz.").

* guix/build-system/python.scm (default-python): New procedure.
  (python-build): Use it.
1 files changed, 8 insertions(+), 3 deletions(-)

M guix/build-system/python.scm
M guix/build-system/python.scm => guix/build-system/python.scm +8 -3
@@ 35,12 35,17 @@
;;
;; Code:

(define (default-python)
  "Return the default Python package."
  ;; Lazily resolve the binding to avoid a circular dependency.
  (let ((python (resolve-interface '(gnu packages python))))
    (module-ref python 'python)))

(define* (python-build store name source inputs
                       #:key
                       (python (@ (gnu packages python) python))
                       (python (default-python))
                       (python-version
                        (string-take (package-version
                                      (@ (gnu packages python) python)) 3))
                        (string-take (package-version (default-python)) 3))
                       (tests? #t)
                       (configure-flags ''())
                       (phases '(@ (guix build python-build-system)