all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 0/1] Split acme into both Python variants
@ 2015-12-21 19:32 Leo Famulari
  2015-12-21 19:32 ` [PATCH 1/1] gnu: Split acme into python-acme and python2-acme Leo Famulari
  2015-12-30 15:45 ` [PATCH 0/1] Split acme into both Python variants Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Famulari @ 2015-12-21 19:32 UTC (permalink / raw)
  To: guix-devel

This patch splits the acme library into both Python variants. Currently,
its only user in Guix is the Python 2 official Let's Encrypt client, but
there is other software out there that supports Python 3.

I tried and tried to make the python2-acme version inherit more from
python-acme but this is what I got working.

I did try to apply the solution used in python2-pyopenssl and
python2-oauthlib [0] but I couldn't make it work. I think the issue is
that python2-acme uses both python2-pyopenssl and python2-cryptography,
so there are multiple layers of translation to watch out for.

Suggestions welcome!

I think we should keep these in the same module as letsencrypt, because
it will make it easier to remember to update them together, which
appears to be necessary.

[0]
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=22013

Leo Famulari (1):
  gnu: Split acme into python-acme and python2-acme.

 gnu/packages/tls.scm | 82 +++++++++++++++++++++++++++++++---------------------
 1 file changed, 49 insertions(+), 33 deletions(-)

-- 
2.6.2

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

* [PATCH 1/1] gnu: Split acme into python-acme and python2-acme.
  2015-12-21 19:32 [PATCH 0/1] Split acme into both Python variants Leo Famulari
@ 2015-12-21 19:32 ` Leo Famulari
  2015-12-30 15:45 ` [PATCH 0/1] Split acme into both Python variants Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2015-12-21 19:32 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/tls.scm (acme): Split variable into...
* gnu/packages/tls.scm (python-acme, python2-acme): ...both
Python variants.
* gnu/packages/tls.scm (letsencrypt)[propagated-inputs]: Update user of
renamed variable.
---
 gnu/packages/tls.scm | 82 +++++++++++++++++++++++++++++++---------------------
 1 file changed, 49 insertions(+), 33 deletions(-)

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 5789534..68d27a1 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -348,38 +348,6 @@ security, and applying best practice development processes.")
                      "file://COPYING"
                      "See COPYING in the distribution.")))))
 
-(define-public acme
-  (package
-    (name "acme")
-    (version "0.1.1")
-    (source (origin
-      (method url-fetch)
-      (uri (pypi-uri "acme" version))
-      (sha256
-        (base32
-         "1yv0gy8akaqp5p2wjpfj8r5i0da04a9qdmlh06rczdkrmk6q680w"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:python ,python-2))
-    ;; TODO: Add optional inputs for testing and building documentation.
-    (native-inputs
-     `(("python2-mock" ,python2-mock)
-       ("python2-setuptools" ,python2-setuptools)))
-    (propagated-inputs
-     `(("python2-ndg-httpsclient" ,python2-ndg-httpsclient)
-       ("python2-werkzeug" ,python2-werkzeug)
-       ("python2-six" ,python2-six)
-       ("python2-requests" ,python2-requests)
-       ("python2-pytz" ,python2-pytz)
-       ("python2-pyrfc3339" ,python2-pyrfc3339)
-       ("python2-pyasn1" ,python2-pyasn1)
-       ("python2-cryptography" ,python2-cryptography)
-       ("python2-pyopenssl" ,python2-pyopenssl)))
-    (home-page "https://github.com/letsencrypt/letsencrypt")
-    (synopsis "ACME protocol implementation in Python")
-    (description "ACME protocol implementation in Python")
-    (license license:asl2.0)))
-
 (define-public letsencrypt
   (package
     (name "letsencrypt")
@@ -398,7 +366,7 @@ security, and applying best practice development processes.")
      `(("python2-nose" ,python2-nose)
        ("python2-mock" ,python2-mock)))
     (propagated-inputs
-     `(("acme" ,acme)
+     `(("python2-acme" ,python2-acme)
        ("python2-zope-interface" ,python2-zope-interface)
        ("python2-pythondialog" ,python2-pythondialog)
        ("python2-pyrfc3339" ,python2-pyrfc3339)
@@ -461,3 +429,51 @@ finally access to the SSL api of the SSLeay/OpenSSL package so you can write
 servers or clients for more complicated applications.")
     (license (package-license perl))
     (home-page "http://search.cpan.org/~mikem/Net-SSLeay-1.66/")))
+
+(define-public python-acme
+  (package
+    (name "python-acme")
+    (version "0.1.1")
+    (source (origin
+      (method url-fetch)
+      (uri (pypi-uri "acme" version))
+      (sha256
+        (base32
+          "1yv0gy8akaqp5p2wjpfj8r5i0da04a9qdmlh06rczdkrmk6q680w"))))
+    (build-system python-build-system)
+    ;; TODO: Add optional inputs for testing and building documentation.
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-setuptools" ,python-setuptools)))
+    (propagated-inputs
+     `(("python-ndg-httpsclient" ,python-ndg-httpsclient)
+       ("python-werkzeug" ,python-werkzeug)
+       ("python-six" ,python-six)
+       ("python-requests" ,python-requests)
+       ("python-pytz" ,python-pytz)
+       ("python-pyrfc3339" ,python-pyrfc3339)
+       ("python-pyasn1" ,python-pyasn1)
+       ("python-cryptography" ,python-cryptography)
+       ("python-pyopenssl" ,python-pyopenssl)))
+    (home-page "https://github.com/letsencrypt/letsencrypt")
+    (synopsis "ACME protocol implementation in Python")
+    (description "ACME protocol implementation in Python")
+    (license license:asl2.0)))
+
+(define-public python2-acme
+  (package (inherit python-acme)
+    (name "python2-acme")
+    (arguments `(#:python ,python-2))
+    (native-inputs
+     `(("python2-mock" ,python2-mock)
+       ("python2-setuptools" ,python2-setuptools)))
+    (propagated-inputs
+     `(("python2-cryptography" ,python2-cryptography)
+       ("python2-ndg-httpsclient" ,python2-ndg-httpsclient)
+       ("python2-werkzeug" ,python2-werkzeug)
+       ("python2-six" ,python2-six)
+       ("python2-requests" ,python2-requests)
+       ("python2-pytz" ,python2-pytz)
+       ("python2-pyrfc3339" ,python2-pyrfc3339)
+       ("python2-pyasn1" ,python2-pyasn1)
+       ("python2-pyopenssl" ,python2-pyopenssl)))))
-- 
2.6.2

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

* Re: [PATCH 0/1] Split acme into both Python variants
  2015-12-21 19:32 [PATCH 0/1] Split acme into both Python variants Leo Famulari
  2015-12-21 19:32 ` [PATCH 1/1] gnu: Split acme into python-acme and python2-acme Leo Famulari
@ 2015-12-30 15:45 ` Ludovic Courtès
  2015-12-31  5:25   ` Leo Famulari
  1 sibling, 1 reply; 4+ messages in thread
From: Ludovic Courtès @ 2015-12-30 15:45 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Leo Famulari <leo@famulari.name> skribis:

> This patch splits the acme library into both Python variants. Currently,
> its only user in Guix is the Python 2 official Let's Encrypt client, but
> there is other software out there that supports Python 3.

Sounds reasonable.

> I tried and tried to make the python2-acme version inherit more from
> python-acme but this is what I got working.
>
> I did try to apply the solution used in python2-pyopenssl and
> python2-oauthlib [0] but I couldn't make it work. I think the issue is
> that python2-acme uses both python2-pyopenssl and python2-cryptography,
> so there are multiple layers of translation to watch out for.
>
> Suggestions welcome!

What did you try exactly?  The workaround is to explicitly list
dependencies instead of using those computed by ‘package-with-python2’.

HTH,
Ludo'.

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

* Re: [PATCH 0/1] Split acme into both Python variants
  2015-12-30 15:45 ` [PATCH 0/1] Split acme into both Python variants Ludovic Courtès
@ 2015-12-31  5:25   ` Leo Famulari
  0 siblings, 0 replies; 4+ messages in thread
From: Leo Famulari @ 2015-12-31  5:25 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Wed, Dec 30, 2015 at 04:45:04PM +0100, Ludovic Courtès wrote:
> Leo Famulari <leo@famulari.name> skribis:
> 
> > This patch splits the acme library into both Python variants. Currently,
> > its only user in Guix is the Python 2 official Let's Encrypt client, but
> > there is other software out there that supports Python 3.
> 
> Sounds reasonable.
> 
> > I tried and tried to make the python2-acme version inherit more from
> > python-acme but this is what I got working.
> >
> > I did try to apply the solution used in python2-pyopenssl and
> > python2-oauthlib [0] but I couldn't make it work. I think the issue is
> > that python2-acme uses both python2-pyopenssl and python2-cryptography,
> > so there are multiple layers of translation to watch out for.
> >
> > Suggestions welcome!
> 
> What did you try exactly?  The workaround is to explicitly list
> dependencies instead of using those computed by ‘package-with-python2’.

Despite trying the variations below, the build process kept failing as
described by Efraim in bug#22013 [0].

Here are the variations that I tested, based on reading python.scm:

(define-public python2-acme
  (let ((acme (package-with-python2 python-acme)))
    (package (inherit acme)
      (propagated-inputs
       `(("python2-cryptography" ,python2-cryptography)
         ,@(alist-delete "python-cryptography"
                         (package-propagated-inputs acme)))))))

(define-public python2-acme
  (let ((acme (package-with-python2 python-acme)))
    (package (inherit acme)
      (propagated-inputs
       `(("python2-pyopenssl" ,python2-pyopenssl)
         ("python2-cryptography" ,python2-cryptography)
         ,@(fold alist-delete (package-propagated-inputs acme)
                 '("python-pyopenssl" "python-cryptography")))))))

;; I don't understand this one
(define-public python2-acme
  (let ((acme (package-with-python2 python-acme)))
    (package (inherit acme)
      (propagated-inputs
       `(("python2-cryptography" ,python2-cryptography)
         ("python2-pyopenssl" ,python2-pyopenssl)
         ,@(alist-delete "python-pyopenssl"
                         (alist-delete "python-cryptography"
                                       (package-propagated-inputs acme))))))))

[0]
http://lists.gnu.org/archive/html/bug-guix/2015-11/msg00124.html

> 
> HTH,
> Ludo'.

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

end of thread, other threads:[~2015-12-31  5:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-21 19:32 [PATCH 0/1] Split acme into both Python variants Leo Famulari
2015-12-21 19:32 ` [PATCH 1/1] gnu: Split acme into python-acme and python2-acme Leo Famulari
2015-12-30 15:45 ` [PATCH 0/1] Split acme into both Python variants Ludovic Courtès
2015-12-31  5:25   ` Leo Famulari

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.