* [PATCH 1/3] guix import pypi: add the Apache License 2.0
2014-10-15 22:49 [PATCH 0/3] guix import pypi: trivial fixes Cyril Roelandt
@ 2014-10-15 22:49 ` 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
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Cyril Roelandt @ 2014-10-15 22:49 UTC (permalink / raw)
To: guix-devel
* guix/import/pypi.scm (string->license): add ASL2.0.
---
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 d0e776e..8f5e031 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -85,6 +85,7 @@ recursively apply the procedure to the sub-list."
((or "BSD" "BSD License") bsd-3)
((or "MIT" "MIT license" "Expat license") expat)
("Public domain" public-domain)
+ ("Apache License, Version 2.0" asl2.0)
(_ #f)))
(define (url-fetch url file-name)
@@ -151,7 +152,8 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
(,gpl3 . gpl3)
(,bsd-3 . bsd-3)
(,expat . expat)
- (,public-domain . public-domain))
+ (,public-domain . public-domain)
+ (,asl2.0 . asl2.0))
license))))
(define (pypi->guix-package package-name)
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/3] guix import pypi: add the Apache License 2.0
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
0 siblings, 0 replies; 11+ messages in thread
From: David Thompson @ 2014-10-15 23:24 UTC (permalink / raw)
To: Cyril Roelandt, guix-devel
Cyril Roelandt <tipecaml@gmail.com> writes:
> * guix/import/pypi.scm (string->license): add ASL2.0.
> ---
> 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 d0e776e..8f5e031 100644
> --- a/guix/import/pypi.scm
> +++ b/guix/import/pypi.scm
> @@ -85,6 +85,7 @@ recursively apply the procedure to the sub-list."
> ((or "BSD" "BSD License") bsd-3)
> ((or "MIT" "MIT license" "Expat license") expat)
> ("Public domain" public-domain)
> + ("Apache License, Version 2.0" asl2.0)
> (_ #f)))
>
> (define (url-fetch url file-name)
> @@ -151,7 +152,8 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE."
> (,gpl3 . gpl3)
> (,bsd-3 . bsd-3)
> (,expat . expat)
> - (,public-domain . public-domain))
> + (,public-domain . public-domain)
> + (,asl2.0 . asl2.0))
> license))))
>
> (define (pypi->guix-package package-name)
> --
> 1.8.4.rc3
>
>
Looks good.
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/3] guix import pypi: do not add "python-" to a package name if it's already there.
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 22:49 ` Cyril Roelandt
2014-10-15 23:25 ` David Thompson
2014-10-15 22:49 ` [PATCH 3/3] guix import pypi: Fix a type in a docstring Cyril Roelandt
2014-10-16 3:02 ` [PATCH 0/3] guix import pypi: trivial fixes Ian Denhardt
3 siblings, 1 reply; 11+ messages in thread
From: Cyril Roelandt @ 2014-10-15 22:49 UTC (permalink / raw)
To: guix-devel
* 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
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] guix import pypi: do not add "python-" to a package name if it's already there.
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
0 siblings, 1 reply; 11+ messages in thread
From: David Thompson @ 2014-10-15 23:25 UTC (permalink / raw)
To: Cyril Roelandt, guix-devel
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?
> + (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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] guix import pypi: do not add "python-" to a package name if it's already there.
2014-10-15 23:25 ` David Thompson
@ 2014-10-16 7:47 ` Ludovic Courtès
2014-10-16 13:03 ` Thompson, David
0 siblings, 1 reply; 11+ messages in thread
From: Ludovic Courtès @ 2014-10-16 7:47 UTC (permalink / raw)
To: David Thompson; +Cc: guix-devel
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?
Ludo’.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/3] guix import pypi: do not add "python-" to a package name if it's already there.
2014-10-16 7:47 ` Ludovic Courtès
@ 2014-10-16 13:03 ` Thompson, David
0 siblings, 0 replies; 11+ messages in thread
From: Thompson, David @ 2014-10-16 13:03 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/3] guix import pypi: Fix a type in a docstring.
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 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 22:49 ` Cyril Roelandt
2014-10-15 23:26 ` David Thompson
2014-10-16 3:02 ` [PATCH 0/3] guix import pypi: trivial fixes Ian Denhardt
3 siblings, 1 reply; 11+ messages in thread
From: Cyril Roelandt @ 2014-10-15 22:49 UTC (permalink / raw)
To: guix-devel
* guix/import/pypi.scm (snake-case): Fix documentation.
---
guix/import/pypi.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
index 722ad9d..12abbac 100644
--- a/guix/import/pypi.scm
+++ b/guix/import/pypi.scm
@@ -117,8 +117,8 @@ recursively apply the procedure to the sub-list."
(assoc-ref* pypi-package "info" "version")))))
(define (snake-case str)
- "Return a downcased version of the string STR where dashes are replaced with
-underscores."
+ "Return a downcased version of the string STR where underscores are replaced
+with dashes."
(string-join (string-split (string-downcase str) #\_) "-"))
(define (guix-hash-url url)
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] guix import pypi: Fix a type in a docstring.
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
0 siblings, 0 replies; 11+ messages in thread
From: David Thompson @ 2014-10-15 23:26 UTC (permalink / raw)
To: Cyril Roelandt, guix-devel
Cyril Roelandt <tipecaml@gmail.com> writes:
> * guix/import/pypi.scm (snake-case): Fix documentation.
> ---
> guix/import/pypi.scm | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm
> index 722ad9d..12abbac 100644
> --- a/guix/import/pypi.scm
> +++ b/guix/import/pypi.scm
> @@ -117,8 +117,8 @@ recursively apply the procedure to the sub-list."
> (assoc-ref* pypi-package "info" "version")))))
>
> (define (snake-case str)
> - "Return a downcased version of the string STR where dashes are replaced with
> -underscores."
> + "Return a downcased version of the string STR where underscores are replaced
> +with dashes."
> (string-join (string-split (string-downcase str) #\_) "-"))
>
> (define (guix-hash-url url)
> --
> 1.8.4.rc3
>
>
Oops! Looks good.
Thanks for these patches!
--
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 0/3] guix import pypi: trivial fixes.
2014-10-15 22:49 [PATCH 0/3] guix import pypi: trivial fixes Cyril Roelandt
` (2 preceding siblings ...)
2014-10-15 22:49 ` [PATCH 3/3] guix import pypi: Fix a type in a docstring Cyril Roelandt
@ 2014-10-16 3:02 ` Ian Denhardt
2014-10-21 2:22 ` Cyril Roelandt
3 siblings, 1 reply; 11+ messages in thread
From: Ian Denhardt @ 2014-10-16 3:02 UTC (permalink / raw)
To: Cyril Roelandt, guix-devel
[-- Attachment #1: Type: text/plain, Size: 129 bytes --]
Quoting Cyril Roelandt (2014-10-15 18:49:11)
> guix import pypi: Fix a type in a docstring.
Was this supposed to be typo?
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABAgAGBQJUPzU7AAoJEPZUuMfUyjy43aAP/Ag9WmBUgxl/CwJXwgHPB9kd
d35crRvR/LktxvQZ/GQZkvvWKxsWkCPOtm0zBmRAq0+vKft1LQP8zbgxEdB1+HHC
k9zBNVYKUGzgkg15JJlP/drt7OvVVCPK+4f8MMDYMgOTLYdHmrR7il24Ado1SqHd
f6SaZiLtDbH/4hZe5h6EIGpEoJQ6t8REFIrDlaDyIINxHmJt0fjprhGpdt3xqmz8
paJPHIW/arlxOsqjkYfSh8XENWX9IpDmjv/hv2UXcroWUdpch72R5HrfxOLB/mdV
upCOiZWLUC6Pcy2VnOVR2jZqcbKAkC7qf34f7MK8u8lOx/q+49X+Y4ePGFzFinDt
2wTwozlSFWywUVyvB4IOxCK3CqcILlfZEVV2nbZEJ8aE+nJQsohEakEUuhhEIJUB
Otdulhx3MAeqijvg8iP0JF3AuAqMN+KD7jToFNNEj9YuH6XHTxNS4qyORr3kiHWs
rr6VsKqE1yi++GLlGNvEBzRwR1uIl+6+fxTQ5kFvJwiUyjhA8rXat8DPC4I1M5pz
A2HJG7B5U2lqvc9VzuUUR9wFuoVHwzH590x3GuW3eAlvrocsmIbOnS9vnRTFLWJa
oVYxM+lCj7w0+yeMf3NpJVSJQLntAhps+/2FKEv3lt6YljEcKJb0/VZQZkrG8prb
PPLVaLtAlKPwMxD/rBWL
=NNH4
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 11+ messages in thread