python-build-system: Fix 'get-python-version'.

* guix/build/python-build-system.scm (get-python-version): Rewrite to handle
  multiple-digit version number components.
This commit is contained in:
Mark H Weaver 2015-08-05 04:12:14 -04:00
parent 494e9b9167
commit 9f6509c655

View file

@ -55,7 +55,10 @@ (define* (check #:key tests? test-target #:allow-other-keys)
#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)