[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trying to fix an error in the pypi-importer
From: |
Ben Woodcroft |
Subject: |
Re: Trying to fix an error in the pypi-importer |
Date: |
Thu, 31 Dec 2015 07:27:02 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
Hi,
On 31/12/15 05:53, address@hidden wrote:
Hi :)
I am trying to fix this error in the pypi-importer:
[..]
I read up on if-else with Guile and changed it to:
(define (pypi-uri name version ending)
"Return a URI string for the Python package hosted on the Python
Package
Index (PyPI) corresponding to NAME and VERSION."
(if (zero? ending)
(string-append "https://pypi.python.org/packages/source/"
(string-take name 1) "/" name "/"
name "-" version ".tar.gz"))
(else
(string-append "https://pypi.python.org/packages/source/"
(string-take name 1) "/" name "/"
name "-" version "." ending )))
You should just omit the (else and matching bracket to avoid the error.
Will this work?
I did a make and got:
GUILEC guix/build-system/python.go
guix/build-system/python.scm:51:2: warning: possibly unbound variable
`else'
wrote `guix/build-system/python.go'
For testing, there's no need to run make if you don't want, you can just
run an the import and the new code will be used.
Seems like a good idea to me overall.
ben