From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia@riseup.net Subject: Re: Trying to fix an error in the pypi-importer Date: Fri, 01 Jan 2016 19:10:20 +0100 Message-ID: <2c5756c8877a36699f8dbb07731ab3c1@riseup.net> References: <568453F6.1050605@gmail.com> 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]:36897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF49h-0006n4-G1 for guix-devel@gnu.org; Fri, 01 Jan 2016 13:10:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aF49d-0007RV-24 for guix-devel@gnu.org; Fri, 01 Jan 2016 13:10:25 -0500 Received: from mx1.riseup.net ([198.252.153.129]:46102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aF49c-0007RQ-PS for guix-devel@gnu.org; Fri, 01 Jan 2016 13:10:20 -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 3327D1A212E for ; Fri, 1 Jan 2016 10:10:20 -0800 (PST) In-Reply-To: <568453F6.1050605@gmail.com> 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 On 2015-12-30 23:00, Cyril Roelandt wrote: > On 12/30/2015 08:53 PM, swedebugia@riseup.net wrote: >> I am trying to fix this error in the pypi-importer: > > Could you send your fix as a unified diff? If you work from the git > repo, you can just run "git diff" to produce one. diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index 2532210..f9b88d2 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -41,13 +41,18 @@ ;; ;; Code: -(define (pypi-uri name version) +(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." - (string-append "https://pypi.python.org/packages/source/" +Index (PyPI) corresponding to NAME, VERSION and optionally ENDING." + (if (zero? ending) + (string-append "https://pypi.python.org/packages/source/" (string-take name 1) "/" name "/" - name "-" version ".tar.gz")) - + name "-" version ".tar.gz") + ;else + (string-append "https://pypi.python.org/packages/source/" + (string-take name 1) "/" name "/" + name "-" version "." ending )) + (define %python-build-system-modules ;; Build-side modules imported by default. `((guix build python-build-system)