From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: [PATCH 2/3] guix import pypi: do not add "python-" to a package name if it's already there. Date: Wed, 15 Oct 2014 19:25:46 -0400 Message-ID: <87lhogdif9.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> References: <1413413354-31144-1-git-send-email-tipecaml@gmail.com> <1413413354-31144-3-git-send-email-tipecaml@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeXx5-0000ux-Vs for guix-devel@gnu.org; Wed, 15 Oct 2014 19:26:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeXwy-0005qB-SF for guix-devel@gnu.org; Wed, 15 Oct 2014 19:25:55 -0400 Received: from na6sys009bog027.obsmtp.com ([74.125.150.94]:54740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeXwy-0005po-NZ for guix-devel@gnu.org; Wed, 15 Oct 2014 19:25:48 -0400 Received: by mail-qg0-f53.google.com with SMTP id q107so1771665qgd.12 for ; Wed, 15 Oct 2014 16:25:48 -0700 (PDT) In-Reply-To: <1413413354-31144-3-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: Cyril Roelandt , guix-devel@gnu.org Cyril Roelandt writes: > * 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) Could we do a regexp match instead? > + (snake-case name) > + (string-append "python-" (snake-case name)))) > (version ,version) > (source (origin > (method url-fetch) > -- > 1.8.4.rc3 > > -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate