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
1 changed files with 4 additions and 1 deletions

View File

@ -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)