aboutsummaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-08-05 04:12:14 -0400
committerMark H Weaver <mhw@netris.org>2015-08-06 16:33:54 -0400
commit9f6509c655b766b0fb9dfab181a8533e698473b0 (patch)
treed3899ff49be1580e8fdd78ea69783576e7b548b3 /guix/build
parent494e9b916718ef7bf1ac99058cfdd5dcbb895a36 (diff)
downloadgnu-guix-9f6509c655b766b0fb9dfab181a8533e698473b0.tar
gnu-guix-9f6509c655b766b0fb9dfab181a8533e698473b0.tar.gz
python-build-system: Fix 'get-python-version'.
* guix/build/python-build-system.scm (get-python-version): Rewrite to handle multiple-digit version number components.
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/python-build-system.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/build/python-build-system.scm b/guix/build/python-build-system.scm
index d008ac2c69..1ae42c00b4 100644
--- a/guix/build/python-build-system.scm
+++ b/guix/build/python-build-system.scm
@@ -55,7 +55,10 @@
#t))
(define (get-python-version python)
- (string-take (string-take-right python 5) 3))
+ (let* ((version (last (string-split python #\-)))
+ (components (string-split version #\.))
+ (major+minor (take components 2)))
+ (string-join major+minor ".")))
(define* (install #:key outputs inputs (configure-flags '())
#:allow-other-keys)