diff options
author | Mark H Weaver <mhw@netris.org> | 2015-08-05 04:12:14 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-08-06 16:33:54 -0400 |
commit | 9f6509c655b766b0fb9dfab181a8533e698473b0 (patch) | |
tree | d3899ff49be1580e8fdd78ea69783576e7b548b3 /guix | |
parent | 494e9b916718ef7bf1ac99058cfdd5dcbb895a36 (diff) |
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')
-rw-r--r-- | guix/build/python-build-system.scm | 5 |
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) |