From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia@riseup.net Subject: Trying to fix an error in the pypi-importer Date: Wed, 30 Dec 2015 20:53:47 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEMoi-0006rT-5c for guix-devel@gnu.org; Wed, 30 Dec 2015 14:53:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEMoe-0003Ql-WF for guix-devel@gnu.org; Wed, 30 Dec 2015 14:53:52 -0500 Received: from mx1.riseup.net ([198.252.153.129]:55180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEMoe-0003QW-QW for guix-devel@gnu.org; Wed, 30 Dec 2015 14:53:48 -0500 Received: from cotinga.riseup.net (unknown [10.0.1.164]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id EC8001A1A3D for ; Wed, 30 Dec 2015 11:53:47 -0800 (PST) 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: guix-devel Hi :) I am trying to fix this error in the pypi-importer: ~/src/guix$ ./pre-inst-env guix lint python-twisted gnu/packages/python.scm:6628:0: python-twisted-15.5.0: all the source URIs are unreachable: gnu/packages/python.scm:6628:0: python-twisted-15.5.0: URI https://pypi.python.org/packages/source/T/Twisted/Twisted-15.5.0.tar.gz not reachable: 404 ("Not Found") -> it should be .tar.bz2* but the pypi-importer hardcodes tar.gz in guix/build-system/python.scm: (define (pypi-uri name version) "Return a URI string for the Python package hosted on the Python Package Index (PyPI) corresponding to NAME and VERSION." (string-append "https://pypi.python.org/packages/source/" (string-take name 1) "/" name "/" name "-" version ".tar.gz")) 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 ))) 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' The goal was to change in a way that would not break all other calls to the procedure pypi-uri. Any thoughts? * see https://pypi.python.org/pypi/Twisted/json