guix-devel
[Top][All Lists]
Advanced

[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: 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
User-agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)

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?

> +                (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]