From 460621aba2789d2986649d9a5dcc159aa48d4b6e Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Fri, 11 Sep 2020 11:23:35 -0400 Subject: [PATCH 1/3] gnu: Add python-slixmpp. * gnu/packages/python-xyz.scm (python-slixmpp): New variable. --- gnu/packages/python-xyz.scm | 69 +++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index ff8fc55aed..305f16993a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -123,6 +123,7 @@ #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) + #:use-module (gnu packages gnupg) #:use-module (gnu packages graphviz) #:use-module (gnu packages graphics) #:use-module (gnu packages gsasl) @@ -134,6 +135,7 @@ #:use-module (gnu packages kerberos) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) + #:use-module (gnu packages libidn) #:use-module (gnu packages linux) #:use-module (gnu packages llvm) #:use-module (gnu packages man) @@ -188,35 +190,50 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-26)) -(define-public python-tenacity +(define-public python-slixmpp (package - (name "python-tenacity") - (version "6.1.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "tenacity" version)) - (sha256 - (base32 - "1j36v9fcpmmd4985ix0cwnvcq71rkrn5cjiiv0id9vkl4kpxh0gv")))) + (name "python-slixmpp") + (version "1.5.2") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://lab.louiz.org/poezio/slixmpp.git") + (commit + (string-append "slix-" version)))) + (file-name + (git-file-name name version)) + (sha256 + (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx")))) (build-system python-build-system) - (native-inputs - `(("python-setuptools-scm" ,python-setuptools-scm) - ("python-sphinx" ,python-sphinx) - ("python-tornado" ,python-tornado) - ("python-pytest" ,python-pytest))) - (propagated-inputs - `(("python-six" ,python-six))) (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "pytest") - #t))))) - (home-page "https://github.com/jd/tenacity") - (synopsis "Retrying library for python") - (description "Tenacity is a general-purpose python library to simplify the -task of adding retry behavior to just about anything.") - (license license:asl2.0))) + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda _ + (substitute* "setup.py" + (("'CC', 'cc'") + "'CC', 'gcc'")) + #t))))) + (native-inputs + `(("gnupg" ,gnupg) + ("pkg-config" ,pkg-config))) + (inputs + `(("aiodns" ,python-aiodns) + ("aiohttp" ,python-aiohttp) + ("cython" ,python-cython) + ("libidn" ,libidn) + ("pyasn1" ,python-pyasn1) + ("pyasn1-modules" ,python-pyasn1-modules) + ("python" ,python))) + (synopsis "XMPP Library") + (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of +SleekXMPP. Its goal is to only rewrite the core of the library (the low level +socket handling, the timers, the events dispatching) in order to remove all +threads.") + (home-page "https://lab.louiz.org/poezio/slixmpp") + (license license:expat))) (define-public python-colorlog (package -- 2.28.0