Dear Guixers, I'm sending a patch series to add zulip-term and its dependencies. Thank you, Giacomo
* 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(-) 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
* gnu/packages/python-xyz.scm (python-urwid-readline): New variable. --- gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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
* gnu/packages/python-xyz.scm (python-matrix-client): New variable. --- gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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
* gnu/packages/python-xyz.scm (python-flake8-continuation): New variable. --- gnu/packages/python-xyz.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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
* gnu/packages/python-xyz.scm (python-flake8-quotes): New variable. --- gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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
* gnu/packages/python-xyz.scm (python-snakeviz): New variable. --- gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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
* gnu/packages/python-xyz.scm (python-zulip): New variable. --- gnu/packages/python-xyz.scm | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) 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
* 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(+) 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
[-- Attachment #1: Type: text/plain, Size: 917 bytes --] 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #1: Type: text/plain, Size: 313 bytes --] 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]