[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] guix import pypi: do not add "python-" to a package name
From: |
Thompson, David |
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 |
On Thu, Oct 16, 2014 at 3:47 AM, Ludovic Courtès <address@hidden> wrote:
> David Thompson <address@hidden> skribis:
>
>> Cyril Roelandt <address@hidden> 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