diff mbox series

[bug#41807,07/26] gnu: Add python-trio.

Message ID 20200611151357.18843-7-goodoldpaul@autistici.org
State Accepted
Headers show
Series [bug#41807,01/26] gnu: Add python-outcome. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Giacomo Leidi June 11, 2020, 3:13 p.m. UTC
* gnu/packages/python-xyz.scm (python-trio): New variable.
---
 gnu/packages/python-xyz.scm | 58 +++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f1feccd8c2..b6dec540ab 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20220,3 +20220,61 @@  async function is running under.")
 TLS certificates for testing purposes.")
     ;; Choice of either license.
     (license (list license:expat license:asl2.0))))
+
+(define-public python-trio
+  (package
+    (name "python-trio")
+    (version "0.15.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "trio" version))
+       (sha256
+        (base32
+         "0cvzd0ls2c5971v7rw1jpxq533sdjblb15xwsd2axcnqp158c41h"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; This test fails with a timeout error.
+           (delete-file "trio/_core/tests/test_ki.py")
+           ;; This test depends on trio/_core/tests/test_ki.py.
+           (delete-file "trio/tests/test_threads.py")
+           ;; This test depends on network access.
+           (delete-file "trio/tests/test_socket.py")
+           ;; This test depends on writing to $HOME.
+           (delete-file "trio/tests/test_exports.py")))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-astor" ,python-astor)
+       ("python-jedi" ,python-jedi)
+       ("python-pylint" ,python-pylint)
+       ("python-pyopenssl" ,python-pyopenssl)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-trustme" ,python-trustme)))
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda _
+                      (invoke "pytest")
+                      #t)))))
+    (propagated-inputs
+     `(("python-async-generator"
+        ,python-async-generator)
+       ("python-attrs" ,python-attrs)
+       ("python-cffi" ,python-cffi)
+       ("python-contextvars" ,python-contextvars)
+       ("python-idna" ,python-idna)
+       ("python-outcome" ,python-outcome)
+       ("python-sniffio" ,python-sniffio)
+       ("python-sortedcontainers"
+        ,python-sortedcontainers)))
+    (home-page "https://github.com/python-trio/trio")
+    (synopsis
+     "Python library for async concurrency and I/O")
+    (description
+     "The Trio project's goal is to produce a production-quality,
+permissively licensed, async/await-native I/O library for Python.")
+    ;; Choice of either license.
+    (license (list license:expat license:asl2.0))))
+