summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-06-21 18:11:25 +0200
committerLudovic Courtès <ludo@gnu.org>2019-06-21 18:18:15 +0200
commit9c2563a80b6f1d8fb8677f5314e6180ea9916aa5 (patch)
tree7180f199969379240cba3aec50b287d3c3175a61 /guix/build
parent1dcca83afbc2a5b66f61f389971d257d2d65100d (diff)
build-system/python: Export 'python-version'.
* guix/build/python-build-system.scm (get-python-version): Rename to... (python-version): ... this. Update callers. Make public. * gnu/packages/gstreamer.scm (python-gst)[arguments]: Adjust accordingly. * gnu/packages/machine-learning.scm (ghmm)[arguments]: Likewise. * gnu/packages/openldap.scm (389-ds-base)[arguments]: Import (guix build python-build-system). Use 'python-version'. * gnu/packages/package-management.scm (conda)[arguments]: Use 'python-version'.
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/python-build-system.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index 7c00306b3e..09bd8465c8 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2015, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org>
@@ -32,6 +32,7 @@
#:export (%standard-phases
add-installed-pythonpath
site-packages
+ python-version
python-build))
;; Commentary:
@@ -147,7 +148,7 @@
(format #t "test suite not run~%"))
#t)
-(define (get-python-version python)
+(define (python-version python)
(let* ((version (last (string-split python #\-)))
(components (string-split version #\.))
(major+minor (take components 2)))
@@ -158,7 +159,7 @@
(let* ((out (assoc-ref outputs "out"))
(python (assoc-ref inputs "python")))
(string-append out "/lib/python"
- (get-python-version python)
+ (python-version python)
"/site-packages/")))
(define (add-installed-pythonpath inputs outputs)
@@ -202,7 +203,7 @@ when running checks after installing the package."
(python (assoc-ref inputs "python"))
(var `("PYTHONPATH" prefix
,(cons (string-append out "/lib/python"
- (get-python-version python)
+ (python-version python)
"/site-packages")
(search-path-as-string->list
(or (getenv "PYTHONPATH") ""))))))
@@ -222,7 +223,7 @@ installed with setuptools."
(let* ((out (assoc-ref outputs "out"))
(python (assoc-ref inputs "python"))
(site-packages (string-append out "/lib/python"
- (get-python-version python)
+ (python-version python)
"/site-packages"))
(easy-install-pth (string-append site-packages "/easy-install.pth"))
(new-pth (string-append site-packages "/" name ".pth")))