diff options
Diffstat (limited to 'guix/build-system/python.scm')
-rw-r--r-- | guix/build-system/python.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index a51c033d01..de2159fdc7 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -34,6 +34,7 @@ #:use-module (srfi srfi-1) #:export (%python-build-system-modules package-with-python2 + package-with-pypy strip-python2-variant default-python default-python2 @@ -72,6 +73,11 @@ extension, such as '.tar.gz'." (let ((python (resolve-interface '(gnu packages python)))) (module-ref python 'python-2))) +(define (default-pypy) + "Return the default pypy package." + (let ((python (resolve-interface '(gnu packages python)))) + (module-ref python 'pypy))) + (define sanity-check.py ;; The script used to validate the installation of a Python package. (search-auxiliary-file "python/sanity-check.py")) @@ -126,6 +132,14 @@ pre-defined variants." (package-mapping transform cut?)) +(define package-with-pypy + ;; Note: delay call to 'default-pypy' until after the 'arguments' field + ;; of packages is accessed to avoid a circular dependency when evaluating + ;; the top-level of (gnu packages python). + (package-with-explicit-python (delay (default-pypy)) + "python-" "pypy-" + #:variant-property 'pypy-variant)) + (define package-with-python2 ;; Note: delay call to 'default-python2' until after the 'arguments' field ;; of packages is accessed to avoid a circular dependency when evaluating |