summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
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)