[PATCH] Add zulip-term and dependencies.

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • paul
Owner
unassigned
Submitted by
paul
Severity
normal
P
(address . guix-patches@gnu.org)
0f549bbb-5cef-3250-5900-4c51c72fd51d@autistici.org
Dear Guixers,

I'm sending a patch series to add zulip-term and its dependencies.

Thank you,

Giacomo
G
G
Giacomo Leidi wrote on 28 Dec 2020 22:32
[PATCH 1/8] gnu: python-urwid: Update to 2.1.1.
(address . 45514@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20201228213245.12577-1-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-urwid): Update to 2.1.1.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index acde5a5e5e..739943b116 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -7372,14 +7372,14 @@ computing.")
(define-public python-urwid
(package
(name "python-urwid")
- (version "2.1.0")
+ (version "2.1.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "urwid" version))
(sha256
(base32
- "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8"))))
+ "09nmi2nmvpcmbh3w3fb0dn0c7yp7r20i5pfcr6q722xh6mp8cw3q"))))
(build-system python-build-system)
(home-page "http://urwid.org")
(synopsis "Console user interface library for Python")
--
2.29.2
G
G
Giacomo Leidi wrote on 28 Dec 2020 22:32
[PATCH 3/8] gnu: Add python-matrix-client.
(address . 45514@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20201228213245.12577-3-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-matrix-client): New variable.
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 307608adf6..6f3b74bfab 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23231,3 +23231,27 @@ query Watchman to discover file changes.")
"This package provides a textbox edit widget for @code{python-urwid} that
supports @code{readline} shortcuts.")
(license license:expat)))
+
+(define-public python-matrix-client
+ (package
+ (name "python-matrix-client")
+ (version "0.3.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "matrix-client" version))
+ (sha256
+ (base32
+ "1mgjd0ymf9mvqjkvgx3xjhxap7rzdmpa21wfy0cxbw2xcswcrqyw"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-requests" ,python-requests)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-runner" ,python-pytest-runner)
+ ("python-responses" ,python-responses)))
+ (home-page
+ "https://github.com/matrix-org/matrix-python-sdk")
+ (synopsis "Client-Server SDK for Matrix")
+ (description "This package provides client-server SDK for Matrix.")
+ (license license:asl2.0)))
--
2.29.2
G
G
Giacomo Leidi wrote on 28 Dec 2020 22:32
[PATCH 5/8] gnu: Add python-flake8-quotes.
(address . 45514@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20201228213245.12577-5-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-flake8-quotes): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e7ed416367..1bbb425ae8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23283,3 +23283,23 @@ can be broken over multiple lines by wrapping expressions in parentheses.
These should be used in preference to using a backslash for line continuation.
@end quotation")
(license license:asl2.0)))
+
+(define-public python-flake8-quotes
+ (package
+ (name "python-flake8-quotes")
+ (version "3.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "flake8-quotes" version))
+ (sha256
+ (base32
+ "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-flake8" ,python-flake8)))
+ (home-page
+ "http://github.com/zheller/flake8-quotes/")
+ (synopsis "Flake8 lint for quotes.")
+ (description "This package provides a Flake8 lint for quotes.")
+ (license license:expat)))
--
2.29.2
G
G
Giacomo Leidi wrote on 28 Dec 2020 22:32
[PATCH 2/8] gnu: Add python-urwid-readline.
(address . 45514@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20201228213245.12577-2-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-urwid-readline): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 739943b116..307608adf6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23201,3 +23201,33 @@ backport of the @code{dataclasses} module for Python 3.6.")
(description "@code{python-pywatchman} is a library to connect and
query Watchman to discover file changes.")
(license license:bsd-3)))
+
+(define-public python-urwid-readline
+ (package
+ (name "python-urwid-readline")
+ (version "0.12")
+ (source
+ (origin
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/rr-/urwid_readline")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-urwid" ,python-urwid)))
+ (native-inputs
+ `(("python-black" ,python-black)
+ ("python-pytest" ,python-pytest)))
+ (home-page
+ "https://github.com/rr-/urwid_readline")
+ (synopsis
+ "Text input widget for urwid that supports readline shortcuts")
+ (description
+ "This package provides a textbox edit widget for @code{python-urwid} that
+supports @code{readline} shortcuts.")
+ (license license:expat)))
--
2.29.2
G
G
Giacomo Leidi wrote on 28 Dec 2020 22:32
[PATCH 4/8] gnu: Add python-flake8-continuation.
(address . 45514@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20201228213245.12577-4-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-flake8-continuation): New variable.
---
gnu/packages/python-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6f3b74bfab..e7ed416367 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23255,3 +23255,31 @@ supports @code{readline} shortcuts.")
(synopsis "Client-Server SDK for Matrix")
(description "This package provides client-server SDK for Matrix.")
(license license:asl2.0)))
+
+(define-public python-flake8-continuation
+ (package
+ (name "python-flake8-continuation")
+ (version "1.0.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "flake8-continuation" version))
+ (sha256
+ (base32
+ "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-flake8" ,python-flake8)
+ ("python-pycodestyle" ,python-pycodestyle)
+ ("python-six" ,python-six)))
+ (home-page "https://github.com/planetlabs/flake8-continuation")
+ (synopsis "Flake8 Line Continuation Plugin")
+ (description "A Flake8 plugin that checks for the line continuation
+style to be in the preferred method according to PEP-8, specifically:
+@quotation
+The preferred way of wrapping long lines is by using Python's implied
+line continuation inside parentheses, brackets and braces. Long lines
+can be broken over multiple lines by wrapping expressions in parentheses.
+These should be used in preference to using a backslash for line continuation.
+@end quotation")
+ (license license:asl2.0)))
--
2.29.2
G
G
Giacomo Leidi wrote on 28 Dec 2020 22:32
[PATCH 6/8] gnu: Add python-snakeviz.
(address . 45514@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20201228213245.12577-6-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-snakeviz): New variable.
---
gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1bbb425ae8..8a00bebe3e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23303,3 +23303,28 @@ These should be used in preference to using a backslash for line continuation.
(synopsis "Flake8 lint for quotes.")
(description "This package provides a Flake8 lint for quotes.")
(license license:expat)))
+
+(define-public python-snakeviz
+ (package
+ (name "python-snakeviz")
+ (version "2.1.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "snakeviz" version))
+ (sha256
+ (base32
+ "0s6byw23hr2khqx2az36hpi52fk4v6bfm1bb7biaf0d2nrpqgbcj"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-tornado" ,python-tornado)))
+ (home-page
+ "https://jiffyclub.github.io/snakeviz/")
+ (synopsis
+ "Web-based viewer for Python profiler output")
+ (description
+ "SnakeViz is a browser based graphical viewer for
+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)))
--
2.29.2
G
G
Giacomo Leidi wrote on 28 Dec 2020 22:32
[PATCH 7/8] gnu: Add python-zulip.
(address . 45514@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20201228213245.12577-7-goodoldpaul@autistici.org
* gnu/packages/python-xyz.scm (python-zulip): New variable.
---
gnu/packages/python-xyz.scm | 49 +++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)

Toggle diff (59 lines)
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)))
--
2.29.2
G
G
Giacomo Leidi wrote on 28 Dec 2020 22:32
[PATCH 8/8] gnu: Add zulip-term.
(address . 45514@debbugs.gnu.org)(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)
20201228213245.12577-8-goodoldpaul@autistici.org
* gnu/packages/xml.scm (python-lxml-for-zulip-term): New variable;
* gnu/packages/messaging.scm (zulip-term): New variable.
---
gnu/packages/messaging.scm | 60 ++++++++++++++++++++++++++++++++++++++
gnu/packages/xml.scm | 13 +++++++++
2 files changed, 73 insertions(+)

Toggle diff (92 lines)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 1393843e57..5416ada2a0 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2441,4 +2441,64 @@ as phones, embedded computers or microcontrollers.")
;; Dual licensed.
(license (list license:epl1.0 license:edl1.0))))
+(define-public zulip-term
+ (package
+ (name "zulip-term")
+ (version "0.5.2")
+ (source
+ (origin
+ ;; Pypi package doesn't ship tests.
+ (method git-fetch)
+ (uri
+ (git-reference
+ (url "https://github.com/zulip/zulip-terminal")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1xhhy3v4wck74a83avil0rnmsi2grrh03cww19n5mv80p2q1cjmf"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Delete failing tests.
+ (delete-file "tests/cli/test_run.py")
+ (substitute* "setup.py"
+ (("\\=\\=1\\.7") ">=1.7")
+ (("\\=\\=2\\.5") ">=2.5"))
+ #t))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (invoke "pytest")
+ #t))))))
+ (propagated-inputs
+ `(("python-beautifulsoup4" ,python-beautifulsoup4)
+ ("python-dateutil" ,python-dateutil)
+ ("python-lxml" ,python-lxml-for-zulip-term)
+ ("python-urwid" ,python-urwid)
+ ("python-urwid-readline" ,python-urwid-readline)
+ ("python-zulip" ,python-zulip)))
+ (native-inputs
+ `(("python-distro" ,python-distro)
+ ("python-flake8" ,python-flake8)
+ ("python-flake8-continuation"
+ ,python-flake8-continuation)
+ ("python-flake8-quotes" ,python-flake8-quotes)
+ ("python-isort" ,python-isort)
+ ("python-mypy" ,python-mypy)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-mock" ,python-pytest-mock)
+ ("python-snakeviz" ,python-snakeviz)
+ ("python-zipp" ,python-zipp)))
+ (home-page
+ "https://github.com/zulip/zulip-terminal")
+ (synopsis "Zulip's official terminal client")
+ (description "Zulip's official terminal client")
+ (license license:asl2.0)))
+
;;; messaging.scm ends here
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 9dc37addf4..847a4e9174 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -2323,3 +2323,16 @@ XML data to JSON and other formats.")
(description "This package provides a Python library to convert XML to
@code{OrderedDict}.")
(license license:expat)))
+
+;; This is only for zulip-term
+(define-public python-lxml-for-zulip-term
+ (package
+ (inherit python-lxml)
+ (version "4.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "lxml" version))
+ (sha256
+ (base32
+ "1xhx76hr1w3lllfcg9a01f2y0zwyf59ijnvlh08299mjh8b3mhfd"))))))
--
2.29.2
E
E
Efraim Flashner wrote on 1 Apr 2021 14:15
Re: [bug#45514] [PATCH 6/8] gnu: Add python-snakeviz.
(name . Giacomo Leidi)(address . goodoldpaul@autistici.org)(address . 45514@debbugs.gnu.org)
YGW5T+047lj0YYc8@3900XT
Thanks for the patch and my apologies for taking so long to get around
to it.

This patch has some minimized javascript in the snakeviz/vendor
directory which needs to be unbundled. I don't know how useful the
package is with it removed instead of replaced, but here's the snippet
from the 'unpack phase

snakeviz-2.1.0/snakeviz/static/vendor/
snakeviz-2.1.0/snakeviz/static/vendor/d3.v3.min.js
snakeviz-2.1.0/snakeviz/static/vendor/immutable.min.js
snakeviz-2.1.0/snakeviz/static/vendor/jquery-3.2.1.min.js
snakeviz-2.1.0/snakeviz/static/vendor/jquery.dataTables.min.css
snakeviz-2.1.0/snakeviz/static/vendor/jquery.dataTables.min.js
snakeviz-2.1.0/snakeviz/static/vendor/lodash.min.js


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBluU8ACgkQQarn3Mo9
g1Ei/RAAre9FUrZHqsVDZL2/a4EL0hoxJH7pc84YlhECSrKdXLA6KkyYIZAXnHBD
joG/hIUjgD2byBh6c7tWwDRjQ6mb7Q97APVLxoOvvBex3zazqyS200VIy7pnlQe9
GwGLovQNpZUY1TJSmLnCn+pNMHY2k6/470QYvaxsa2dIxjTjv3MrqF+CogAzhruQ
6nAvVpIjgL07LdMUsE/D3OJqaa5GU84MWSG6RmyA4rIwuob8i3MwjEmliDN6GKro
MeU4dPubweCQwRBdnCAasHrvSrECcRaQchL+KanuWorpGEK7EIP4XC1v7tqMYs0H
qhB3RiHLhqqR2ISHJ94EkL4ZACaRFOeuCrQaQv876WSi6bm43venLXPfR+mk3mBP
wYZme7KZMkEpoXwJTuhi4hbc40HJ3lvOkikGdwp92GiwHF7xdH3X/176rAL6zPnZ
CAAasnnmdCNxf58AcRYThdm6k39WGiHrUEXce1Q8IZC++ZhRV+X5JFvYZbsIKM/L
Qudf3Bmi9bTQSF69yfg0Z/Lp9aw7HwRPIZ7NQM9KU6Gx2qFFXiFSXD9dPXPt0s1k
bUkXiIx2SO/XjD2IyF39s1yQeXPCJdzFG5Cub/Kn1Sz0i5PtlkXxDj17x2pZXDy+
9SBD88vH2oS/T8C4V+E/h7pPxiDsmLZJzFs3QgRJC5nKGJeGx6Q=
=/HfK
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 1 Apr 2021 14:15
Re: [bug#45514] [PATCH] Add zulip-term and dependencies.
(name . paul)(address . goodoldpaul@autistici.org)(address . 45514-done@debbugs.gnu.org)
YGW5VWjVfjnmyavm@3900XT
Thanks for the patches. I was able to apply them and try zulip-term even
without python-snakeviz.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBluVUACgkQQarn3Mo9
g1FD9w//X+A5eHH0OTG+RbE+8MOnMYcEhjgImM3MGCSPIS84vwdSZiSi83jITPM4
8i2FOOlPFqzvs9EjyNtBEVgGu25ilrZguiiO94eG7xdVr7C8A2xQwo0hNTljJkgl
SNelIQ02KCGBZR+hrBZ/aHEvJTEgPw016RnbdHgyd49LE6IQ0Tkee/21k3M3ov4a
apFiJ5KALYq7qbo7x6HeazNndtJGFIScPE2uXqLH+Ie+YRfY8vj+Ys1JRQkUo+3D
asqKU+g3t3AUHCErjT6tcnH196g2CEMBvpupHmaEW2G0yZ1qqptEg7/zI+iVwSRm
PM7cmbaWp/jIrmqABfSbjqe0QYSCbn0KK/jgCihLgSkpvST8m62/UnyJYs85qjY+
jaup3Cj9n1MthSQRduBemxWsoDgAYaXnCSp1mlHX2zQpaDAfiyiT2F3hH11r0mql
mGTjn/1Mvd7iRCEe4ZInSNYI4o9RChaJXIdJJZ+JyYUD8zFJoaIHtz6Kz6d7qFj5
frJgYmoNqs67HhCWXjd/1IPsV6lsbfvQcGjafdkHAZ0ceGAES6oH56CbfApqe18S
imZolTLzL1axP/puInbva/kWaL5DnGCtCsfqIpvviBAyatNR8uyIm7R8ZezIfus5
nIeRsawJo6p+vWs/aoy7XHzXpJmgsxG4pO7R0XzZ29m1//E5Alg=
=yfyL
-----END PGP SIGNATURE-----


Closed
?