diff mbox series

[bug#45514,7/8] gnu: Add python-zulip.

Message ID 20201228213245.12577-7-goodoldpaul@autistici.org
State Accepted
Headers show
Series [bug#45514,1/8] gnu: python-urwid: Update to 2.1.1. | expand

Checks

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

Commit Message

Giacomo Leidi Dec. 28, 2020, 9:32 p.m. UTC
* gnu/packages/python-xyz.scm (python-zulip): New variable.
---
 gnu/packages/python-xyz.scm | 49 +++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8a00bebe3e..e25ebda63b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23328,3 +23328,52 @@  the output of Python’s cProfile module and an alternative to
 using the standard library pstats module.
 It was originally inspired by RunSnakeRun. ")
     (license license:bsd-3)))
+
+(define-public python-zulip
+  (package
+    (name "python-zulip")
+    (version "0.7.1")
+    (source
+     (origin
+       ;; There is no source on Pypi.
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/zulip/python-zulip-api")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0da1ki1v252avy27j6d7snnc0gyq0xa9fypm3qdmxhw2w79d6q36"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'cd-to-zulip-dir
+           (lambda _
+             (chdir "zulip")
+             #t))
+         (replace 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((test-zulip "../tools/test-zulip"))
+               (add-installed-pythonpath inputs outputs)
+               (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
+               (patch-shebang test-zulip)
+               (invoke test-zulip)))))))
+    (propagated-inputs
+     `(("python-matrix-client" ,python-matrix-client)
+       ("python-pyopenssl" ,python-pyopenssl)
+       ("python-requests" ,python-requests)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-cython" ,python-cython)
+       ("python-distro" ,python-distro)
+       ("python-pytest" ,python-pytest)
+       ("python-setuptools" ,python-setuptools)))
+    (home-page
+     "https://github.com/zulip/python-zulip-api")
+    (synopsis
+     "Zulip's API Python bindings")
+    (description
+     "This package provides Zulip's API Python bindings.")
+    (license license:asl2.0)))