unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber
@ 2018-04-10  9:24 Tomáš Čech
  2018-04-10  9:29 ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
  2018-04-16 21:36 ` [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber Marius Bakke
  0 siblings, 2 replies; 17+ messages in thread
From: Tomáš Čech @ 2018-04-10  9:24 UTC (permalink / raw)
  To: 31121

 * gnu/packages/python.scm (python2-urlgrabber): New variable.
---
 gnu/packages/python.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e5b74a57f..e728cbaa9 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13127,3 +13127,24 @@ file system events on Linux.")
     (description "Pybtex is a BibTeX-compatible bibliography processor written
 in Python.  You can simply type pybtex instead of bibtex.")
     (license license:expat)))
+
+(define-public python2-urlgrabber
+  (package
+    (name "python2-urlgrabber")
+    (version "3.10.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "urlgrabber" version))
+       (sha256
+        (base32
+         "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2))
+    (home-page "http://urlgrabber.baseurl.org")
+    (synopsis "A high-level cross protocol url-grabber")
+    (description "URL grabber library unifying http://, ftp:// and file://
+protocols access, supporting HTTP keepalive, reget, throttling and other
+convenience features.")
+    (license license:lgpl2.1)))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto.
  2018-04-10  9:24 [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber Tomáš Čech
@ 2018-04-10  9:29 ` Tomáš Čech
  2018-04-10  9:29   ` [bug#31121] [PATCH 3/3] gnu: Add osc Tomáš Čech
  2018-04-16 21:54   ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Marius Bakke
  2018-04-16 21:36 ` [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber Marius Bakke
  1 sibling, 2 replies; 17+ messages in thread
From: Tomáš Čech @ 2018-04-10  9:29 UTC (permalink / raw)
  To: 31121

 * gnu/packages/python.scm (python-m2crypto): New variable.
   (python2-m2crypto): New variable.
---
 gnu/packages/python.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e728cbaa9..d84aae1fb 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13148,3 +13148,39 @@ in Python.  You can simply type pybtex instead of bibtex.")
 protocols access, supporting HTTP keepalive, reget, throttling and other
 convenience features.")
     (license license:lgpl2.1)))
+
+(define-public python-m2crypto
+  (package
+    (name "python-m2crypto")
+    (version "0.29.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "M2Crypto" version))
+       (sha256
+        (base32
+         "1h16gpilrnlzc0iyj1mnd1iqh8wchzjsxjqw9n344glimg2s5zm0"))))
+    (build-system python-build-system)
+    (inputs
+     `(("openssl" ,openssl)))
+    (propagated-inputs
+     `(("python-typing" ,python-typing)))
+    (home-page "https://gitlab.com/m2crypto/m2crypto")
+    (synopsis "A Python crypto and SSL toolkit")
+    (description "A Python crypto and SSL toolkit.  M2 stands for \"me, too!\"
+.  M2Crypto comes with the following:
+RSA, DSA, DH, HMACs, message digests,
+symmetric ciphers including AES,
+TLS functionality to implement clients and servers.
+Example SSL client and server programs, which are variously
+threading, forking or based on non-blocking socket IO.
+HTTPS extensions to Python's httplib, urllib and xmlrpclib.
+Unforgeable HMAC'ing AuthCookies for web session management.
+FTP/TLS client and server.
+S/MIME v2.
+ZServerSSL: A HTTPS server for Zope.
+ZSmime: An S/MIME messenger for Zope.")
+    (license license:x11)))
+
+(define-public python2-m2crypto
+  (package-with-python2 python-m2crypto))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 3/3] gnu: Add osc.
  2018-04-10  9:29 ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
@ 2018-04-10  9:29   ` Tomáš Čech
  2018-04-16 22:04     ` Marius Bakke
  2018-04-16 21:54   ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Marius Bakke
  1 sibling, 1 reply; 17+ messages in thread
From: Tomáš Čech @ 2018-04-10  9:29 UTC (permalink / raw)
  To: 31121

 * gnu/packages/python.scm (osc): New variable.
---
 gnu/packages/python.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index d84aae1fb..86a706e38 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -13184,3 +13184,44 @@ ZSmime: An S/MIME messenger for Zope.")
 
 (define-public python2-m2crypto
   (package-with-python2 python-m2crypto))
+
+(define-public osc
+  (package
+    (name "osc")
+    (version "0.162.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/openSUSE/" name "/archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0b4kpm96ns4smqyfjysbk2p78d36x44xprpna8zz85q1y5xn57aj"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'fix-filename-and-remove-unused
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
+               ;; osc tool is renamed in spec file, not setup.py, let's do
+               ;; that too
+               (rename-file
+                (string-append bin "osc-wrapper.py")
+                (string-append bin "osc"))
+               ;; unused and broken script
+               (delete-file (string-append bin "osc_hotshot.py"))
+             #t))))))
+    (inputs
+     `(("python2-urlgrabber" ,python2-urlgrabber)
+       ("python2-pycurl" ,python2-pycurl)))
+    (propagated-inputs
+     `(("python2-m2crypto" ,python2-m2crypto)))
+    (home-page "https://github.com/openSUSE/osc")
+    (synopsis "Open Build Service command line tool")
+    (description "Command line interface to Open Build Service.  It allows you
+to checkout, commit, perform reviews etc.  Vast majority of the OBS
+functionality is available via commands and the rest can be reached via direct
+API calls.")
+    (license license:gpl2+)))
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber
  2018-04-10  9:24 [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber Tomáš Čech
  2018-04-10  9:29 ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
@ 2018-04-16 21:36 ` Marius Bakke
  2018-04-16 21:46   ` Tomáš Čech
  1 sibling, 1 reply; 17+ messages in thread
From: Marius Bakke @ 2018-04-16 21:36 UTC (permalink / raw)
  To: Tomáš Čech, 31121

[-- Attachment #1: Type: text/plain, Size: 1581 bytes --]

Tomáš Čech <sleep_walker@gnu.org> writes:

>  * gnu/packages/python.scm (python2-urlgrabber): New variable.

There is a 'python-web' module as well, would that be a good fit for
this package?  python.scm had to be split up since it was causing
problems for the Guile compiler.

[...]

> +(define-public python2-urlgrabber
> +  (package
> +    (name "python2-urlgrabber")
> +    (version "3.10.2")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "urlgrabber" version))
> +       (sha256
> +        (base32
> +         "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:python ,python-2))

If Python 3 is unsupported, please add a comment about it.  Otherwise
it's better to add a Python 3 variant and make the Py2 variant inherit
from it.

> +    (home-page "http://urlgrabber.baseurl.org")
> +    (synopsis "A high-level cross protocol url-grabber")

Synopses should not start with an article (I believe `guix lint` will
warn about this).  Simply "High-level cross-protocol URL grabber".

> +    (description "URL grabber library unifying http://, ftp:// and file://
> +protocols access, supporting HTTP keepalive, reget, throttling and other
> +convenience features.")

Please turn this into one or more complete sentences.
E.g. "@code{urlgrabber} is a Python library that unifies access to
...  It supports bla bla.".

> +    (license license:lgpl2.1)))

This should be LGPL2.1+ as mentioned in the code headers.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber
  2018-04-16 21:36 ` [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber Marius Bakke
@ 2018-04-16 21:46   ` Tomáš Čech
  2018-04-16 23:13     ` Marius Bakke
  2018-04-17 21:38     ` Tomáš Čech
  0 siblings, 2 replies; 17+ messages in thread
From: Tomáš Čech @ 2018-04-16 21:46 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 31121

[-- Attachment #1: Type: text/plain, Size: 2040 bytes --]

Hi Marius,

On Mon, Apr 16, 2018 at 11:36:56PM +0200, Marius Bakke wrote:
>Tomáš Čech <sleep_walker@gnu.org> writes:
>
>>  * gnu/packages/python.scm (python2-urlgrabber): New variable.
>
>There is a 'python-web' module as well, would that be a good fit for
>this package?  python.scm had to be split up since it was causing
>problems for the Guile compiler.

I believe that it will fit into python-web as well.

>
>[...]
>
>> +(define-public python2-urlgrabber
>> +  (package
>> +    (name "python2-urlgrabber")
>> +    (version "3.10.2")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (pypi-uri "urlgrabber" version))
>> +       (sha256
>> +        (base32
>> +         "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
>> +    (build-system python-build-system)
>> +    (arguments
>> +     `(#:python ,python-2))
>
>If Python 3 is unsupported, please add a comment about it.  Otherwise
>it's better to add a Python 3 variant and make the Py2 variant inherit
>from it.

Yes, python 2 is the only supported, I'll add comment.

>
>> +    (home-page "http://urlgrabber.baseurl.org")
>> +    (synopsis "A high-level cross protocol url-grabber")
>
>Synopses should not start with an article (I believe `guix lint` will
>warn about this).  Simply "High-level cross-protocol URL grabber".

I'll use that.

>
>> +    (description "URL grabber library unifying http://, ftp:// and file://
>> +protocols access, supporting HTTP keepalive, reget, throttling and other
>> +convenience features.")
>
>Please turn this into one or more complete sentences.
>E.g. "@code{urlgrabber} is a Python library that unifies access to
>...  It supports bla bla.".

To be honest, this is always the most painful part for me. I'll try to come with something better.

>
>> +    (license license:lgpl2.1)))
>
>This should be LGPL2.1+ as mentioned in the code headers.

I'll fix that.


Thanks for review, I'll prepare next version.

Best regards,

S_W


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto.
  2018-04-10  9:29 ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
  2018-04-10  9:29   ` [bug#31121] [PATCH 3/3] gnu: Add osc Tomáš Čech
@ 2018-04-16 21:54   ` Marius Bakke
  1 sibling, 0 replies; 17+ messages in thread
From: Marius Bakke @ 2018-04-16 21:54 UTC (permalink / raw)
  To: Tomáš Čech, 31121

[-- Attachment #1: Type: text/plain, Size: 1989 bytes --]

Tomáš Čech <sleep_walker@gnu.org> writes:

>  * gnu/packages/python.scm (python-m2crypto): New variable.
>    (python2-m2crypto): New variable.

Maybe this could go in 'python-crypto.scm'?

[...]

> +    (home-page "https://gitlab.com/m2crypto/m2crypto")
> +    (synopsis "A Python crypto and SSL toolkit")

No articles in synopses please :-)

Also, s/SSL/TLS.

> +    (description "A Python crypto and SSL toolkit.  M2 stands for \"me, too!\"

Can you try to turn this into a full sentence?  E.g. "M2crypto is a
library for ...".

> +.  M2Crypto comes with the following:
> +RSA, DSA, DH, HMACs, message digests,
> +symmetric ciphers including AES,
> +TLS functionality to implement clients and servers.
> +Example SSL client and server programs, which are variously
> +threading, forking or based on non-blocking socket IO.
> +HTTPS extensions to Python's httplib, urllib and xmlrpclib.
> +Unforgeable HMAC'ing AuthCookies for web session management.
> +FTP/TLS client and server.
> +S/MIME v2.
> +ZServerSSL: A HTTPS server for Zope.
> +ZSmime: An S/MIME messenger for Zope.")

You can use @enumerate here to make it look better on gnu.org and guix
package --search.  Although maybe the format from setup.py is better
(sans marketing language):

M2Crypto is the most complete Python wrapper for OpenSSL featuring RSA, DSA,
DH, EC, HMACs, message digests, symmetric ciphers (including AES); SSL
functionality to implement clients and servers; HTTPS extensions to Python's
httplib, urllib, and xmlrpclib; unforgeable HMAC'ing AuthCookies for web
session management; FTP/TLS client and server; S/MIME; M2Crypto can also be
used to provide SSL for Twisted. Smartcards supported through the Engine
interface.

At least make sure the output from `guix package --search` looks nice :)
(and that guix lint is happy, of course)

> +    (license license:x11)))

I believe this is "expat" since it does not contain the advertisement
clause.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 3/3] gnu: Add osc.
  2018-04-10  9:29   ` [bug#31121] [PATCH 3/3] gnu: Add osc Tomáš Čech
@ 2018-04-16 22:04     ` Marius Bakke
  2018-04-17 21:39       ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
  2018-04-17 21:40       ` [bug#31121] [PATCH 3/3] gnu: Add osc Tomáš Čech
  0 siblings, 2 replies; 17+ messages in thread
From: Marius Bakke @ 2018-04-16 22:04 UTC (permalink / raw)
  To: Tomáš Čech, 31121

[-- Attachment #1: Type: text/plain, Size: 2519 bytes --]

Tomáš Čech <sleep_walker@gnu.org> writes:

>  * gnu/packages/python.scm (osc): New variable.

Woo, awesome! :-)

I wonder if this could go in 'build-tools.scm' since it's not really a
generic Python library in the traditional sense.  Or maybe we should add
an 'obs' module?

> +(define-public osc
> +  (package
> +    (name "osc")
> +    (version "0.162.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://github.com/openSUSE/" name "/archive/" version ".tar.gz"))

This line is too long (I believe guix lint will agree).

> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "0b4kpm96ns4smqyfjysbk2p78d36x44xprpna8zz85q1y5xn57aj"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:python ,python-2
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'fix-filename-and-remove-unused
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
> +               ;; osc tool is renamed in spec file, not setup.py, let's do
> +               ;; that too

Nit-pick: Please use capitalisation and punctuation in comments.

> +               (rename-file
> +                (string-append bin "osc-wrapper.py")
> +                (string-append bin "osc"))
> +               ;; unused and broken script
... and here.
> +               (delete-file (string-append bin "osc_hotshot.py"))
> +             #t))))))
> +    (inputs
> +     `(("python2-urlgrabber" ,python2-urlgrabber)
> +       ("python2-pycurl" ,python2-pycurl)))
> +    (propagated-inputs
> +     `(("python2-m2crypto" ,python2-m2crypto)))

Why is m2crypto propagated, but the others are not?  Does the automatic
wrapper not take care of it?

> +    (home-page "https://github.com/openSUSE/osc")
> +    (synopsis "Open Build Service command line tool")
> +    (description "Command line interface to Open Build Service.  It allows you

Again, full sentences please :-) "@command{osc} is a command line interface...".

> +to checkout, commit, perform reviews etc.  Vast majority of the OBS
                                             ^^^  s/Vast/The vast/

> +functionality is available via commands and the rest can be reached via direct
> +API calls.")
> +    (license license:gpl2+)))
> -- 
> 2.17.0

Can you send updated patches?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber
  2018-04-16 21:46   ` Tomáš Čech
@ 2018-04-16 23:13     ` Marius Bakke
  2018-04-17 21:38     ` Tomáš Čech
  1 sibling, 0 replies; 17+ messages in thread
From: Marius Bakke @ 2018-04-16 23:13 UTC (permalink / raw)
  To: Tomáš Čech; +Cc: 31121

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

Tomáš Čech <sleep_walker@gnu.org> writes:

>>> +    (description "URL grabber library unifying http://, ftp:// and file://
>>> +protocols access, supporting HTTP keepalive, reget, throttling and other
>>> +convenience features.")
>>
>>Please turn this into one or more complete sentences.
>>E.g. "@code{urlgrabber} is a Python library that unifies access to
>>...  It supports bla bla.".
>
> To be honest, this is always the most painful part for me. I'll try to come with something better.

Descriptions *are* difficult, especially for tools you are unfamiliar
with.  It does not help that upstream descriptions are often targeting a
highly specialized demographic, whereas we are catering for a much wider
audience.  I try to make them generic, and include some information
about why the user would want this package/how it's used.

Occasionally I'll browse the packages at gnu.org/s/guix for inspiration.
(or look at Debians description, but don't tell anyone)

Writing the code is comparatively easy :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber.
  2018-04-16 21:46   ` Tomáš Čech
  2018-04-16 23:13     ` Marius Bakke
@ 2018-04-17 21:38     ` Tomáš Čech
  2018-04-18 11:22       ` Marius Bakke
  1 sibling, 1 reply; 17+ messages in thread
From: Tomáš Čech @ 2018-04-17 21:38 UTC (permalink / raw)
  To: 31121

* gnu/packages/python-web (python2-urlgrabber): New variable.
---
 gnu/packages/python-web.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 58c5566f4..5d9caf110 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -23,6 +23,7 @@
 ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
+;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2486,3 +2487,24 @@ layouts.")
 
 (define-public python2-pastescript
   (package-with-python2 python-pastescript))
+
+(define-public python2-urlgrabber
+  (package
+    (name "python2-urlgrabber")
+    (version "3.10.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "urlgrabber" version))
+       (sha256
+        (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
+    (build-system python-build-system)
+    (arguments `(#:python ,python-2)) ;; urlgrabber supports python2 only
+    (home-page "http://urlgrabber.baseurl.org")
+    (synopsis "High-level cross protocol url-grabber")
+    (description "@code{urlgrabber} is Python2 library that unifies access to
+files available on web, FTP or locally.  It supports HTTP, FTP and file://
+protocols, it supports features like HTTP keep-alive, reget, throttling and
+more.")
+    (license license:lgpl2.1+)))
+
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto.
  2018-04-16 22:04     ` Marius Bakke
@ 2018-04-17 21:39       ` Tomáš Čech
  2018-04-18 11:17         ` Marius Bakke
  2018-04-17 21:40       ` [bug#31121] [PATCH 3/3] gnu: Add osc Tomáš Čech
  1 sibling, 1 reply; 17+ messages in thread
From: Tomáš Čech @ 2018-04-17 21:39 UTC (permalink / raw)
  To: 31121

* gnu/packages/python-crypto.scm (python-m2crypto): New variable.
(python2-m2crypto): New variable.
---
 gnu/packages/python-crypto.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 5bfaab171..1ef6371ee 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
 ;;; Copyright © 2016, 2017 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
+;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -761,3 +762,30 @@ in userspace)
 
 (define-public python2-pycryptodome
   (package-with-python2 python-pycryptodome))
+
+(define-public python-m2crypto
+  (package
+    (name "python-m2crypto")
+    (version "0.29.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "M2Crypto" version))
+       (sha256
+        (base32 "1h16gpilrnlzc0iyj1mnd1iqh8wchzjsxjqw9n344glimg2s5zm0"))))
+    (build-system python-build-system)
+    (inputs `(("openssl" ,openssl)))
+    (propagated-inputs `(("python-typing" ,python-typing)))
+    (home-page "https://gitlab.com/m2crypto/m2crypto")
+    (synopsis "Python crypto and SSL toolkit")
+    (description "@code{M2Crypto} is complete Python wrapper for OpenSSL
+featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
+(including AES); TLS functionality to implement clients and servers; HTTPS
+extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
+AuthCookies for web session management; FTP/TLS client and server; S/MIME;
+M2Crypto can also be used to provide SSL for Twisted.  Smartcards supported
+through the Engine interface.")
+    (license license:expat)))
+
+(define-public python2-m2crypto
+  (package-with-python2 python-m2crypto))
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 3/3] gnu: Add osc.
  2018-04-16 22:04     ` Marius Bakke
  2018-04-17 21:39       ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
@ 2018-04-17 21:40       ` Tomáš Čech
  2018-04-18 11:21         ` Marius Bakke
  1 sibling, 1 reply; 17+ messages in thread
From: Tomáš Čech @ 2018-04-17 21:40 UTC (permalink / raw)
  To: 31121

 * gnu/packages/build-tools.scm (osc): New variable.
---
 gnu/packages/build-tools.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 98d12a12f..eb040583b 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Corentin Bocquillon <corentin@nybble.fr>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
+;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +29,8 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages ninja)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python))
@@ -171,3 +174,43 @@ scripted definition of a software project and outputs @file{Makefile}s or
 other lower-level build files.")
     (home-page "https://premake.github.io")
     (license license:bsd-3)))
+
+(define-public osc
+  (package
+    (name "osc")
+    (version "0.162.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/openSUSE/" name
+                           "/archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0b4kpm96ns4smqyfjysbk2p78d36x44xprpna8zz85q1y5xn57aj"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:python ,python-2 ;; Module is python2 only.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'fix-filename-and-remove-unused
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
+               ;; Main osc tool is renamed in spec file, not setup.py, let's
+               ;; do that too.
+               (rename-file
+                (string-append bin "osc-wrapper.py")
+                (string-append bin "osc"))
+               ;; Remove unused and broken script.
+               (delete-file (string-append bin "osc_hotshot.py"))
+             #t))))))
+    (inputs
+     `(("python2-m2crypto" ,python2-m2crypto)
+       ("python2-pycurl" ,python2-pycurl)
+       ("python2-urlgrabber" ,python2-urlgrabber)))
+    (home-page "https://github.com/openSUSE/osc")
+    (synopsis "Open Build Service command line tool")
+    (description "@command{osc} is command line interface to Open Build
+Service.  It allows you to checkout, commit, perform reviews etc.  The vast
+majority of the OBS functionality is available via commands and the rest can
+be reached via direct API calls.")
+    (license license:gpl2+)))
-- 
2.16.3

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto.
  2018-04-17 21:39       ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
@ 2018-04-18 11:17         ` Marius Bakke
  0 siblings, 0 replies; 17+ messages in thread
From: Marius Bakke @ 2018-04-18 11:17 UTC (permalink / raw)
  To: Tomáš Čech, 31121

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

Tomáš Čech <sleep_walker@gnu.org> writes:

> * gnu/packages/python-crypto.scm (python-m2crypto): New variable.
> (python2-m2crypto): New variable.

[...]

> +(define-public python-m2crypto
> +  (package
> +    (name "python-m2crypto")
      ^
Indentation is off.

> +    (version "0.29.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "M2Crypto" version))
> +       (sha256
> +        (base32 "1h16gpilrnlzc0iyj1mnd1iqh8wchzjsxjqw9n344glimg2s5zm0"))))
> +    (build-system python-build-system)
> +    (inputs `(("openssl" ,openssl)))
> +    (propagated-inputs `(("python-typing" ,python-typing)))
> +    (home-page "https://gitlab.com/m2crypto/m2crypto")
> +    (synopsis "Python crypto and SSL toolkit")

s/SSL/TLS
(same for description -- SSL is officially an obsolete term)

> +    (description "@code{M2Crypto} is complete Python wrapper for OpenSSL
                                     "is a"
Typo:                                 ^

Other than that LGTM.

> +featuring RSA, DSA, DH, EC, HMACs, message digests, symmetric ciphers
> +(including AES); TLS functionality to implement clients and servers; HTTPS
> +extensions to Python's httplib, urllib, and xmlrpclib; unforgeable HMAC'ing
> +AuthCookies for web session management; FTP/TLS client and server; S/MIME;
> +M2Crypto can also be used to provide SSL for Twisted.  Smartcards supported
> +through the Engine interface.")
> +    (license license:expat)))
> +
> +(define-public python2-m2crypto
> +  (package-with-python2 python-m2crypto))
> -- 
> 2.16.3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 3/3] gnu: Add osc.
  2018-04-17 21:40       ` [bug#31121] [PATCH 3/3] gnu: Add osc Tomáš Čech
@ 2018-04-18 11:21         ` Marius Bakke
  2018-04-18 12:34           ` Tomáš Čech
  0 siblings, 1 reply; 17+ messages in thread
From: Marius Bakke @ 2018-04-18 11:21 UTC (permalink / raw)
  To: Tomáš Čech, 31121

[-- Attachment #1: Type: text/plain, Size: 2254 bytes --]

Tomáš Čech <sleep_walker@gnu.org> writes:

>  * gnu/packages/build-tools.scm (osc): New variable.

[...]

> +(define-public osc
> +  (package
> +    (name "osc")
      ^
Indentation off here too.

> +    (version "0.162.1")
> +    (source
> +     (origin
> +       (method url-fetch)
         ^
And here.

> +       (uri (string-append "https://github.com/openSUSE/" name
> +                           "/archive/" version ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32 "0b4kpm96ns4smqyfjysbk2p78d36x44xprpna8zz85q1y5xn57aj"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:python ,python-2 ;; Module is python2 only.
                             ^
Only one semicolon for margin comments.

> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'fix-filename-and-remove-unused
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
> +               ;; Main osc tool is renamed in spec file, not setup.py, let's
> +               ;; do that too.
> +               (rename-file
> +                (string-append bin "osc-wrapper.py")
> +                (string-append bin "osc"))
> +               ;; Remove unused and broken script.
> +               (delete-file (string-append bin "osc_hotshot.py"))
> +             #t))))))
> +    (inputs
> +     `(("python2-m2crypto" ,python2-m2crypto)
> +       ("python2-pycurl" ,python2-pycurl)
> +       ("python2-urlgrabber" ,python2-urlgrabber)))
> +    (home-page "https://github.com/openSUSE/osc")
> +    (synopsis "Open Build Service command line tool")
> +    (description "@command{osc} is command line interface to Open Build
                                   ^^^                       ^^^
                                   "is a"                   "to the"
Other than that LGTM.

> +Service.  It allows you to checkout, commit, perform reviews etc.  The vast
> +majority of the OBS functionality is available via commands and the rest can
> +be reached via direct API calls.")
> +    (license license:gpl2+)))
> -- 
> 2.16.3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber.
  2018-04-17 21:38     ` Tomáš Čech
@ 2018-04-18 11:22       ` Marius Bakke
  2018-04-21  6:42         ` bug#31121: patchset Tomáš Čech
  0 siblings, 1 reply; 17+ messages in thread
From: Marius Bakke @ 2018-04-18 11:22 UTC (permalink / raw)
  To: Tomáš Čech, 31121

[-- Attachment #1: Type: text/plain, Size: 1040 bytes --]

Tomáš Čech <sleep_walker@gnu.org> writes:

> * gnu/packages/python-web (python2-urlgrabber): New variable.

[...]

> +(define-public python2-urlgrabber
> +  (package
> +    (name "python2-urlgrabber")
> +    (version "3.10.2")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "urlgrabber" version))
> +       (sha256
> +        (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
> +    (build-system python-build-system)
> +    (arguments `(#:python ,python-2)) ;; urlgrabber supports python2 only
> +    (home-page "http://urlgrabber.baseurl.org")
> +    (synopsis "High-level cross protocol url-grabber")
> +    (description "@code{urlgrabber} is Python2 library that unifies access to
> +files available on web, FTP or locally.  It supports HTTP, FTP and file://
> +protocols, it supports features like HTTP keep-alive, reget, throttling and
> +more.")
> +    (license license:lgpl2.1+)))

Please run this through "./etc/indent-code.el".  LGTM otherwise!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 3/3] gnu: Add osc.
  2018-04-18 11:21         ` Marius Bakke
@ 2018-04-18 12:34           ` Tomáš Čech
  2018-04-19 15:41             ` Marius Bakke
  0 siblings, 1 reply; 17+ messages in thread
From: Tomáš Čech @ 2018-04-18 12:34 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 31121

[-- Attachment #1: Type: text/plain, Size: 2551 bytes --]

Hi,

On Wed, Apr 18, 2018 at 01:21:02PM +0200, Marius Bakke wrote:
>Tomáš Čech <sleep_walker@gnu.org> writes:
>
>>  * gnu/packages/build-tools.scm (osc): New variable.
>
>[...]
>
>> +(define-public osc
>> +  (package
>> +    (name "osc")
>      ^
>Indentation off here too.

I'm sorry, I'm a bit confused here. My Emacs indent the code like this
and indent script you pointed in previous mail doesn't change it for me.

You would like me to reduce one space? Like this?

(define-public osc
  (package
   (name "osc")

It seems that this is not unified in the code. Can I somehow teach my
Emacs indentantation rules?

Thanks for your patienece.

>
>> +    (version "0.162.1")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>         ^
>And here.
>
>> +       (uri (string-append "https://github.com/openSUSE/" name
>> +                           "/archive/" version ".tar.gz"))
>> +       (file-name (string-append name "-" version ".tar.gz"))
>> +       (sha256
>> +        (base32 "0b4kpm96ns4smqyfjysbk2p78d36x44xprpna8zz85q1y5xn57aj"))))
>> +    (build-system python-build-system)
>> +    (arguments
>> +     `(#:python ,python-2 ;; Module is python2 only.
>                             ^
>Only one semicolon for margin comments.

Ack.

>
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'install 'fix-filename-and-remove-unused
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
>> +               ;; Main osc tool is renamed in spec file, not setup.py, let's
>> +               ;; do that too.
>> +               (rename-file
>> +                (string-append bin "osc-wrapper.py")
>> +                (string-append bin "osc"))
>> +               ;; Remove unused and broken script.
>> +               (delete-file (string-append bin "osc_hotshot.py"))
>> +             #t))))))
>> +    (inputs
>> +     `(("python2-m2crypto" ,python2-m2crypto)
>> +       ("python2-pycurl" ,python2-pycurl)
>> +       ("python2-urlgrabber" ,python2-urlgrabber)))
>> +    (home-page "https://github.com/openSUSE/osc")
>> +    (synopsis "Open Build Service command line tool")
>> +    (description "@command{osc} is command line interface to Open Build
>                                   ^^^                       ^^^
>                                   "is a"                   "to the"
>Other than that LGTM.

\o/

Best regards,

S_W

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [bug#31121] [PATCH 3/3] gnu: Add osc.
  2018-04-18 12:34           ` Tomáš Čech
@ 2018-04-19 15:41             ` Marius Bakke
  0 siblings, 0 replies; 17+ messages in thread
From: Marius Bakke @ 2018-04-19 15:41 UTC (permalink / raw)
  To: Tomáš Čech; +Cc: 31121

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

Tomáš Čech <sleep_walker@gnu.org> writes:

> Hi,
>
> On Wed, Apr 18, 2018 at 01:21:02PM +0200, Marius Bakke wrote:
>>Tomáš Čech <sleep_walker@gnu.org> writes:
>>
>>>  * gnu/packages/build-tools.scm (osc): New variable.
>>
>>[...]
>>
>>> +(define-public osc
>>> +  (package
>>> +    (name "osc")
>>      ^
>>Indentation off here too.
>
> I'm sorry, I'm a bit confused here. My Emacs indent the code like this
> and indent script you pointed in previous mail doesn't change it for me.
>
> You would like me to reduce one space? Like this?
>
> (define-public osc
>   (package
>    (name "osc")
>
> It seems that this is not unified in the code. Can I somehow teach my
> Emacs indentantation rules?

Whoops.  I didn't actually verify this, it just looked wrong.  If
someone has a dir-locals.el parser for human brains I'd be interested in
buying one.

Trying it locally in emacs shows that your original level was correct
(though I think the other instance was actually off, no?).  Anyway LGTM!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* bug#31121: patchset
  2018-04-18 11:22       ` Marius Bakke
@ 2018-04-21  6:42         ` Tomáš Čech
  0 siblings, 0 replies; 17+ messages in thread
From: Tomáš Čech @ 2018-04-21  6:42 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 31121-done

[-- Attachment #1: Type: text/plain, Size: 109 bytes --]

I fixed all the problems you found, re-run via indent-code.el and pushed to master.

Thanks for review!

S_W

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-04-21  6:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-10  9:24 [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber Tomáš Čech
2018-04-10  9:29 ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
2018-04-10  9:29   ` [bug#31121] [PATCH 3/3] gnu: Add osc Tomáš Čech
2018-04-16 22:04     ` Marius Bakke
2018-04-17 21:39       ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Tomáš Čech
2018-04-18 11:17         ` Marius Bakke
2018-04-17 21:40       ` [bug#31121] [PATCH 3/3] gnu: Add osc Tomáš Čech
2018-04-18 11:21         ` Marius Bakke
2018-04-18 12:34           ` Tomáš Čech
2018-04-19 15:41             ` Marius Bakke
2018-04-16 21:54   ` [bug#31121] [PATCH 2/3] gnu: Add python-m2crypto, python2-m2crypto Marius Bakke
2018-04-16 21:36 ` [bug#31121] [PATCH 1/3] gnu: Add python2-urlgrabber Marius Bakke
2018-04-16 21:46   ` Tomáš Čech
2018-04-16 23:13     ` Marius Bakke
2018-04-17 21:38     ` Tomáš Čech
2018-04-18 11:22       ` Marius Bakke
2018-04-21  6:42         ` bug#31121: patchset Tomáš Čech

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).