From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH 03/12] import: pypi: Use "pypi-uri" instead of building the URL manually. Date: Mon, 12 Oct 2015 23:40:59 +0200 Message-ID: <1444686068-7668-4-git-send-email-tipecaml@gmail.com> References: <1444686068-7668-1-git-send-email-tipecaml@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlkqQ-0003ZE-Lp for guix-devel@gnu.org; Mon, 12 Oct 2015 17:41:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlkqP-0006yR-LK for guix-devel@gnu.org; Mon, 12 Oct 2015 17:41:22 -0400 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]:36380) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlkqP-0006y1-FI for guix-devel@gnu.org; Mon, 12 Oct 2015 17:41:21 -0400 Received: by wicgb1 with SMTP id gb1so164667694wic.1 for ; Mon, 12 Oct 2015 14:41:21 -0700 (PDT) In-Reply-To: <1444686068-7668-1-git-send-email-tipecaml@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@gnu.org * guix/import/pypi.scm (make-pypi-sexp): Use "pypi-uri". * tests/pypi.scm: Update the tests accordingly. --- guix/import/pypi.scm | 2 +- tests/pypi.scm | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index d04a685..647ef61 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -165,7 +165,7 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." (version ,version) (source (origin (method url-fetch) - (uri (string-append ,@(factorize-uri source-url version))) + (uri (pypi-uri ,name version)) (sha256 (base32 ,(guix-hash-url temp))))) diff --git a/tests/pypi.scm b/tests/pypi.scm index c772474..960b8cd 100644 --- a/tests/pypi.scm +++ b/tests/pypi.scm @@ -84,8 +84,7 @@ baz > 13.37") ('version "1.0.0") ('source ('origin ('method 'url-fetch) - ('uri ('string-append "https://example.com/foo-" - 'version ".tar.gz")) + ('uri (pypi-uri "foo" version)) ('sha256 ('base32 (? string? hash))))) -- 2.1.4