[bug#34515,09/13] gnu: Add python-txtorcon.

Message ID 2518dc3323426f31209dcc5f2a53539baad32058.1550437064.git.leo@famulari.name
State Accepted
Headers show
Series [bug#34515,01/13] gnu: Add python-humanize. | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

Leo Famulari Feb. 17, 2019, 8:57 p.m. UTC
* gnu/packages/python-crypto.scm (python-txtorcon): New variable.
---
 gnu/packages/python-crypto.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

Comments

Ricardo Wurmus Feb. 18, 2019, 8:25 a.m. UTC | #1
Leo Famulari <leo@famulari.name> writes:

> * gnu/packages/python-crypto.scm (python-txtorcon): New variable.
[…]
> +    (arguments
> +     `(#:tests? #f)) ; fail silently

Could you please elaborate on this?  Do all tests fail?  Would it make
sense to disable the broken tests?  Are test failures known to upstream?

Other than that it looks good to me.
Leo Famulari Feb. 19, 2019, 4:03 a.m. UTC | #2
On Mon, Feb 18, 2019 at 09:25:55AM +0100, Ricardo Wurmus wrote:
> Leo Famulari <leo@famulari.name> writes:
> > * gnu/packages/python-crypto.scm (python-txtorcon): New variable.
> […]
> > +    (arguments
> > +     `(#:tests? #f)) ; fail silently
> 
> Could you please elaborate on this?  Do all tests fail?  Would it make
> sense to disable the broken tests?  Are test failures known to upstream?

Basically, the first test that runs looks for a file
'release-announce-test' in the root of the tarball.

This file does not exist in the PyPi or GitHub releases (they are
identical). I checked several releases going back to December 2015, and
none of them contain this file, so I'm not sure what's going on.

Reported upstream at <https://github.com/meejah/txtorcon/issues/330>.

I'll add a comment explaining this.

Also, while skimming some other tests I began to suspect they require
internet access, although I'm not sure.

Patch

diff --git a/gnu/packages/python-crypto.scm b/gnu/packages/python-crypto.scm
index 6ca82cb061..a944ee9662 100644
--- a/gnu/packages/python-crypto.scm
+++ b/gnu/packages/python-crypto.scm
@@ -1036,3 +1036,32 @@  Derivation function (HKDF) defined in RFC 5869.")
     (description "This package provides a Python implementation of the SPAKE2
 Password-Authenticated Key Exchange algorithm.")
     (license license:expat)))
+
+(define-public python-txtorcon
+  (package
+    (name "python-txtorcon")
+    (version "19.0.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "txtorcon" version))
+        (sha256
+         (base32
+          "0fxzhsc62bhmr730vj9pzallmw56gz6iykvl28a5agrycm0bfc9p"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ; fail silently
+    (propagated-inputs
+     `(("python-automat" ,python-automat)
+       ("python-hyperlink" ,python-hyperlink)
+       ("python-idna" ,python-idna)
+       ("python-incremental" ,python-incremental)
+       ("python-ipaddress" ,python-ipaddress)
+       ("python-service-identity" ,python-service-identity)
+       ("python-twisted" ,python-twisted)
+       ("python-zope-interface" ,python-zope-interface)))
+    (home-page "https://github.com/meejah/txtorcon")
+    (synopsis "Twisted-based Tor controller client")
+    (description "This package provides a Twisted-based Tor controller client,
+with state-tracking and configuration abstractions.")
+    (license license:expat)))