From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: Trying to fix an error in the pypi-importer Date: Thu, 31 Dec 2015 07:27:02 +1000 Message-ID: <56844C26.7060602@uq.edu.au> References: <56844BF3.10701@uq.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEOH3-0007zQ-2b for guix-devel@gnu.org; Wed, 30 Dec 2015 16:27:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEOGz-0004D2-2P for guix-devel@gnu.org; Wed, 30 Dec 2015 16:27:13 -0500 Received: from mailhub2.soe.uq.edu.au ([130.102.132.209]:57479 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEOGy-0004Bl-FT for guix-devel@gnu.org; Wed, 30 Dec 2015 16:27:08 -0500 In-Reply-To: <56844BF3.10701@uq.edu.au> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: swedebugia@riseup.net, "guix-devel@gnu.org" Hi, On 31/12/15 05:53, swedebugia@riseup.net 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