unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH 2/3] guix import pypi: do not add "python-" to a package name if it's already there.
Date: Thu, 16 Oct 2014 09:03:13 -0400	[thread overview]
Message-ID: <CAJ=RwfbdzM=3Q2P7fdQ65zjHqa_GLcmN58UBBFkUMoR77A=qZQ@mail.gmail.com> (raw)
In-Reply-To: <87d29s78xb.fsf@gnu.org>

On Thu, Oct 16, 2014 at 3:47 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> David Thompson <dthompson2@worcester.edu> skribis:
>
>> Cyril Roelandt <tipecaml@gmail.com> 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?
>
> Or (string-prefix? "python-" name) maybe?

Cool, didn't know about that one.

- Dave

  reply	other threads:[~2014-10-16 13:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 22:49 [PATCH 0/3] guix import pypi: trivial fixes Cyril Roelandt
2014-10-15 22:49 ` [PATCH 1/3] guix import pypi: add the Apache License 2.0 Cyril Roelandt
2014-10-15 23:24   ` David Thompson
2014-10-15 22:49 ` [PATCH 2/3] guix import pypi: do not add "python-" to a package name if it's already there Cyril Roelandt
2014-10-15 23:25   ` David Thompson
2014-10-16  7:47     ` Ludovic Courtès
2014-10-16 13:03       ` Thompson, David [this message]
2014-10-15 22:49 ` [PATCH 3/3] guix import pypi: Fix a type in a docstring Cyril Roelandt
2014-10-15 23:26   ` David Thompson
2014-10-16  3:02 ` [PATCH 0/3] guix import pypi: trivial fixes Ian Denhardt
2014-10-21  2:22   ` Cyril Roelandt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ=RwfbdzM=3Q2P7fdQ65zjHqa_GLcmN58UBBFkUMoR77A=qZQ@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).