From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Roelandt Subject: [PATCH 2/3] guix import pypi: do not add "python-" to a package name if it's already there. Date: Thu, 16 Oct 2014 00:49:13 +0200 Message-ID: <1413413354-31144-3-git-send-email-tipecaml@gmail.com> References: <1413413354-31144-1-git-send-email-tipecaml@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeXNy-0001M4-QT for guix-devel@gnu.org; Wed, 15 Oct 2014 18:49:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeXNn-0000Y5-9i for guix-devel@gnu.org; Wed, 15 Oct 2014 18:49:38 -0400 Received: from mail-wg0-x229.google.com ([2a00:1450:400c:c00::229]:57915) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeXNn-0000Xj-3e for guix-devel@gnu.org; Wed, 15 Oct 2014 18:49:27 -0400 Received: by mail-wg0-f41.google.com with SMTP id b13so2444021wgh.12 for ; Wed, 15 Oct 2014 15:49:26 -0700 (PDT) In-Reply-To: <1413413354-31144-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): test whether the package name starts with "python-" before modifying it. --- guix/import/pypi.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index 8f5e031..722ad9d 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -134,7 +134,9 @@ underscores." "Return the `package' s-expression for a python package with the given NAME, VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." `(package - (name ,(string-append "python-" (snake-case name))) + (name ,(if (eq? (string-contains name "python-") 0) + (snake-case name) + (string-append "python-" (snake-case name)))) (version ,version) (source (origin (method url-fetch) -- 1.8.4.rc3