;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
-;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
+;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
-;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
-;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
;;; Copyright © 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2018 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
;;;
;;; This file is part of GNU Guix.
;;;
(define-module (gnu packages python-web)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module (guix build-system python)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages django)
+ #:use-module (gnu packages libffi)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-crypto)
+ #:use-module (gnu packages python-xyz)
#:use-module (gnu packages tls)
#:use-module (gnu packages time)
+ #:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (srfi srfi-1))
(define-public python-aiohttp
(package
(name "python-aiohttp")
- (version "3.1.3")
+ (version "3.4.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "aiohttp" version))
(sha256
(base32
- "1b888lggmyf2d08rfayq9khszzc0pav1z70ssc0b4d9kkr4g1klz"))))
+ "1ykm6kdjkrg556j0zd7dx2l1rsrbh0d9g27ivr6dmaahz9pyrbsi"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f)) ;FIXME: 2 errors, 2084 passed
- (native-inputs
- `(("python-async-generator" ,python-async-generator)
- ("python-pytest" ,python-pytest)
- ("python-pytest-capturelog" ,python-pytest-capturelog)
- ("python-pytest-mock" ,python-pytest-mock)))
+ `(#:tests? #f)) ;missing pytest-timeout
(propagated-inputs
`(("python-aiodns" ,python-aiodns)
("python-async-timeout" ,python-async-timeout)
@end itemize")
(license license:asl2.0)))
+(define-public python-aiohttp-socks
+ (package
+ (name "python-aiohttp-socks")
+ (version "0.2.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "aiohttp_socks" version))
+ (sha256
+ (base32
+ "0473702jk66xrgpm28wbdgpnak4v0dh2qmdjw7ky7hf3lwwqkggf"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-aiohttp" ,python-aiohttp)))
+ (home-page "https://github.com/romis2012/aiohttp-socks")
+ (synopsis "SOCKS proxy connector for aiohttp")
+ (description "This package provides a SOCKS proxy connector for
+aiohttp. It supports SOCKS4(a) and SOCKS5.")
+ (license license:asl2.0)))
+
(define-public python-aiodns
(package
(name "python-aiodns")
using @url{https://github.com/saghul/pycares,pycares}.")
(license license:expat)))
+(define-public python-aiorpcx
+ (package
+ (name "python-aiorpcx")
+ (version "0.10.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "aiorpcX" version))
+ (sha256
+ (base32
+ "1p88k15jh0d2a18pnnbfcamsqi2bxvmmhpizmdlxfdxf8vy5ggyj"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-attrs" ,python-attrs)))
+ (home-page "https://github.com/kyuupichan/aiorpcX")
+ (synopsis "Generic asyncio RPC implementation")
+ (description
+ "aiorpcX is a generic asyncio library implementation of RPC suitable for
+an application that is a client, server or both.
+
+The package includes a module with full coverage of JSON RPC versions 1.0 and
+2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
+comes with a SOCKS proxy client.")
+ (license (list license:expat license:bsd-2))))
+
+(define-public python-falcon
+ (package
+ (name "python-falcon")
+ (version "1.4.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "falcon" version))
+ (sha256
+ (base32
+ "1i0vmqsk24z4biirqhpvas9h28wy7nmpy3jvnb6rz2imq04zd09r"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "pytest"))))))
+ (propagated-inputs
+ `(("python-mimeparse" ,python-mimeparse)
+ ("python-six" ,python-six)))
+ (native-inputs
+ `(("python-cython" ,python-cython) ;for faster binaries
+ ("python-pytest" ,python-pytest)
+ ("python-pyyaml" ,python-pyyaml)
+ ("python-requests" ,python-requests)
+ ("python-testtools" ,python-testtools)
+ ("python-jsonschema" ,python-jsonschema)
+ ("python-msgpack" ,python-msgpack)))
+ (home-page "https://falconframework.org")
+ (synopsis
+ "Web framework for building APIs and application backends")
+ (description
+ "Falcon is a web API framework for building microservices, application
+backends and higher-level frameworks. Among its features are:
+@itemize
+@item Optimized and extensible code base
+@item Routing via URI templates and REST-inspired resource
+classes
+@item Access to headers and bodies through request and response
+classes
+@item Request processing via middleware components and hooks
+@item Idiomatic HTTP error responses
+@item Straightforward exception handling
+@item Unit testing support through WSGI helpers and mocks
+@item Compatible with both CPython and PyPy
+@item Cython support for better performance when used with CPython
+@end itemize")
+ (license license:asl2.0)))
+
+(define-public python2-falcon
+ (package-with-python2 python-falcon))
+
+(define-public python-falcon-cors
+ (package
+ (name "python-falcon-cors")
+ (version "1.1.7")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "falcon-cors" version))
+ (sha256
+ (base32
+ "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-falcon" ,python-falcon)))
+ (home-page
+ "https://github.com/lwcolton/falcon-cors")
+ (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
+ (description "This middleware provides @dfn{cross-origin resource
+sharing} (CORS) support for Falcon. It allows applying a specially crafted
+CORS object to the incoming requests, enabling the ability to serve resources
+over a different origin than that of the web application.")
+ (license license:asl2.0)))
+
+(define-public python2-falcon-cors
+ (package-with-python2 python-falcon-cors))
+
(define-public python-furl
(package
(name "python-furl")
(define-public python2-httplib2
(package-with-python2 python-httplib2))
+(define-public python-mechanicalsoup
+ (package
+ (name "python-mechanicalsoup")
+ (version "0.11.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "MechanicalSoup" version))
+ (sha256
+ (base32 "0k59wwk75q7nz6i6gynvzhagy02ql0bv7py3qqcwgjw7607yq4i7"))))
+ (build-system python-build-system)
+ (arguments
+ ;; TODO: Enable tests when python-flake8@3.5 hits master.
+ `(#:tests? #f))
+ (propagated-inputs
+ `(("python-beautifulsoup4" ,python-beautifulsoup4)
+ ("python-lxml" ,python-lxml)
+ ("python-requests" ,python-requests)
+ ("python-six" ,python-six)))
+ ;; (native-inputs
+ ;; ;; For tests.
+ ;; `(("python-pytest-flake8" ,python-pytest-flake8)
+ ;; ("python-pytest-httpbin" ,python-pytest-httpbin)
+ ;; ("python-pytest-mock" ,python-pytest-mock)
+ ;; ("python-pytest-runner" ,python-pytest-runner)
+ ;; ("python-requests-mock" ,python-requests-mock)))
+ (home-page "https://mechanicalsoup.readthedocs.io/")
+ (synopsis "Python library for automating website interaction")
+ (description
+ "MechanicalSoup is a Python library for automating interaction with
+websites. It automatically stores and sends cookies, follows redirects, and can
+follow links and submit forms. It doesn’t do JavaScript.")
+ (license license:expat)))
+
+(define-public python2-mechanicalsoup
+ (package-with-python2 python-mechanicalsoup))
+
(define-public python-sockjs-tornado
(package
(name "python-sockjs-tornado")
- (version "1.0.3")
+ (version "1.0.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "sockjs-tornado" version))
(sha256
(base32
- "16cff40nniqsyvda1pb2j3b4zwmrw7y2g1vqq78lp20xpmhnwwkd"))))
+ "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
(build-system python-build-system)
(arguments
`(;; There are no tests, and running the test phase requires missing
(arguments
;; The tests attempt to access external web servers, so we cannot run
;; them. Furthermore, they are skipped altogether when using Python 2.
- '(#:tests? #f))
+ '(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'configure-tls-backend
+ (lambda _
+ ;; XXX: PycURL fails to automatically determine which TLS
+ ;; backend to use when cURL is built with --disable-static.
+ ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
+ (setenv "PYCURL_SSL_LIBRARY" "gnutls")
+ #t)))))
(native-inputs
`(("python-nose" ,python-nose)
("python-bottle" ,python-bottle)))
(define-public python-openid
(package
(name "python-openid")
- (version "3.0.10")
+ (version "3.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "python3-openid" version))
(sha256
(base32
- "1x3nh3fycqfn43jp5j5pb4q4y2jxp4mdka4absaa3bc0078qd758"))))
+ "00l5hrjh19740w00b3fnsqldnla41wbr2rics09dl4kyd1fkd3b2"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
- (invoke "./admin/runtests")
- #t)))))
+ (invoke "coverage" "run" "-m"
+ "unittest" "openid.test.test_suite"))))))
(properties `((python2-variant . ,(delay python2-openid))))
(propagated-inputs
`(("python-defusedxml" ,python-defusedxml)))
(native-inputs
- `(("python-psycopg2" ,python-psycopg2)
+ `(("python-coverage" ,python-coverage)
+ ("python-psycopg2" ,python-psycopg2)
("python-django" ,python-django)))
(home-page "https://github.com/necaris/python3-openid")
(synopsis "OpenID support for servers and consumers")
(build-system python-build-system)
(arguments
;; Python 3 support is in `python3-openid`, a separate package.
- `(#:python ,python-2))
+ `(#:python ,python-2
+ ;; Tests aren't initialized correctly.
+ #:tests? #f))
(home-page "https://github.com/openid/python-openid")
(synopsis "OpenID support for servers and consumers")
(description "This library provides OpenID authentication for Python, both
(define-public python-tornado
(package
(name "python-tornado")
- (version "4.5.1")
+ (version "5.1.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "tornado" version))
(sha256
- (base32 "1zbkgcdfq81k298awrm8p0xwbwwn2p3nbizdglzfbkskhai082fv"))))
+ (base32
+ "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
(build-system python-build-system)
(arguments
'(;; FIXME: Two tests error out with:
;; (lambda _
;; ;; 'setup.py test' hits an AssertionError on BSD-specific
;; ;; "tornado/platform/kqueue.py". This is the supported method:
- ;; (invoke- "python" "-m" "tornado.test")
+ ;; (invoke "python" "-m" "tornado.test.runtests")
;; #t)))
#:tests? #f))
(native-inputs
`(("python-certifi" ,python-certifi)))
- (propagated-inputs
- `(("python-backports-abc" ,python-backports-abc)))
- (home-page "http://www.tornadoweb.org/")
+ (home-page "https://www.tornadoweb.org/")
(synopsis "Python web framework and asynchronous networking library")
(description
"Tornado is a Python web framework and asynchronous networking library,
(propagated-inputs
`(("python2-backport-ssl-match-hostname"
,python2-backport-ssl-match-hostname)
+ ("python2-backports-abc" ,python2-backports-abc)
("python2-singledispatch" ,python2-singledispatch)
,@(package-propagated-inputs tornado))))))
(define-public python-terminado
(package
(name "python-terminado")
- (version "0.6")
+ (version "0.8.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "terminado" version))
(sha256
(base32
- "09h1kwi86g5mrk14s4pgbhshd602zry29lnpxamcqz864kva22rc"))))
+ "0yh69k6579g848rmjyllb5h75pkvgcy27r1l3yzgkf33wnnzkasm"))))
(build-system python-build-system)
(propagated-inputs
`(("python-tornado" ,python-tornado)
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "nosetests")
- #t)))))
+ (lambda _ (invoke "nosetests") #t)))))
(home-page "https://github.com/takluyver/terminado")
(synopsis "Terminals served to term.js using Tornado websockets")
(description "This package provides a Tornado websocket backend for the
(version "1.2.2")
(source (origin
(method url-fetch)
- (uri (string-append
- "https://pypi.python.org/packages/"
- "38/76/ebcbc24d0cb77db34520a3ca6ed1bd43ace17d182bbd8dd7d976f1c176fb/"
- "wsgi_intercept-" version ".tar.gz"))
+ (uri (pypi-uri "wsgi_intercept" version))
(sha256
(base32
"0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
(source
(origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.event/zope.event-" version ".tar.gz"))
+ (uri (pypi-uri "zope.event" version))
(sha256
(base32
"11p75zpfz3ffhz21nzx9wb23xs993ck5s6hkjcvhswwizni5jynw"))))
(source
(origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.interface/zope.interface-" version ".tar.gz"))
+ (uri (pypi-uri "zope.interface" version))
(sha256
(base32
"0ks8h73b2g4bkad821qbv0wzjppdrwys33i7ka45ik3wxjg1l8if"))))
(source
(origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.exceptions/zope.exceptions-"
- version ".tar.gz"))
+ (uri (pypi-uri "zope.exceptions" version))
(sha256
(base32
"0zwxaaa66sqxg5k7zcrvs0fbg9ym1njnxnr28dfmchzhwjvwnfzl"))))
(source
(origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.testrunner/zope.testrunner-"
- version ".zip"))
+ (uri (pypi-uri "zope.testrunner" version ".zip"))
(sha256
(base32
"1r7iqknhh55y45f64mz5hghgvzx34h1i11k350s0avx6q8gznja1"))))
(source
(origin
(method url-fetch)
- (uri (string-append
- "https://pypi.python.org/packages/source/z"
- "/zope.i18nmessageid/zope.i18nmessageid-"
- version ".tar.gz"))
+ (uri (pypi-uri "zope.i18nmessageid" version))
(sha256
(base32
"1rslyph0klk58dmjjy4j0jxy21k03azksixc3x2xhqbkv97cmzml"))))
(source
(origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.schema/zope.schema-" version ".tar.gz"))
+ (uri (pypi-uri "zope.schema" version))
(sha256
(base32
"1p943jdxb587dh7php4vx04qvn7b2877hr4qs5zyckvp5afhhank"))))
(version "4.0.3")
(source (origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.configuration/zope.configuration-"
- version ".tar.gz"))
+ (uri (pypi-uri "zope.configuration" version))
(sha256
(base32
"1x9dfqypgympnlm25p9m43xh4qv3p7d75vksv9pzqibrb4cggw5n"))))
(source
(origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.proxy/zope.proxy-" version ".tar.gz"))
+ (uri (pypi-uri "zope.proxy" version))
(sha256
(base32
"0pqwwmvm1prhwv1ziv9lp8iirz7xkwb6n2kyj36p2h0ppyyhjnm4"))))
(source
(origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.location/zope.location-" version ".tar.gz"))
+ (uri (pypi-uri "zope.location" version))
(sha256
(base32
"1nj9da4ksiyv3h8n2vpzwd0pb03mdsh7zy87hfpx72b6p2zcwg74"))))
(source
(origin
(method url-fetch)
- (uri (string-append "https://pypi.python.org/packages/source/z"
- "/zope.security/zope.security-" version ".tar.gz"))
+ (uri (pypi-uri "zope.security" version))
(sha256
(base32
"14zmf684amc0x32kq05yxnhfqd1cmyhafkw05gn81rn90zjv6ssy"))))
(define-public python-websocket-client
(package
(name "python-websocket-client")
- (version "0.37.0")
+ (version "0.54.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "websocket_client" version))
(sha256
(base32
- "0h9glp1jll3z76ly3kg08aqgxqk0a68p4zi9yn50353bh5nj92v7"))))
+ "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
(build-system python-build-system)
(propagated-inputs
`(("python-six" ,python-six)))
(synopsis "WebSocket client for Python")
(description "The Websocket-client module provides the low level APIs for
WebSocket usage in Python programs.")
+ (properties `((python2-variant . ,(delay python2-websocket-client))))
(license license:lgpl2.1+)))
(define-public python2-websocket-client
- (package-with-python2 python-websocket-client))
+ (let ((base (package-with-python2
+ (strip-python2-variant python-websocket-client))))
+ (package
+ (inherit base)
+ (native-inputs
+ `(("python2-backport-ssl-match-hostname"
+ ,python2-backport-ssl-match-hostname)
+ ,@(package-native-inputs base))))))
(define-public python-requests
(package
(define-public python-urllib3
(package
(name "python-urllib3")
- (version "1.18.1")
+ (version "1.24.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "urllib3" version))
(sha256
(base32
- "1wb8aqnq53vzh2amrv8kc66f3h6fx217y0q62y6n30a64p2yqmam"))))
+ "08lwd9f3hqznyf32vnzwvp87pchx062nkbgyrf67rwlkgj0jk5fy"))))
(build-system python-build-system)
(arguments `(#:tests? #f))
(native-inputs
`(;; some packages for tests
- ("python-nose" ,python-nose)
("python-mock" ,python-mock)
+ ("python-pytest" ,python-pytest)
("python-tornado" ,python-tornado)))
(propagated-inputs
`(;; These 5 inputs are used to build urrlib3[secure]
("python-certifi" ,python-certifi)
- ("python-cryptography" ,python-cryptography) ;
+ ("python-cryptography" ,python-cryptography)
("python-idna" ,python-idna)
("python-ipaddress" ,python-ipaddress)
- ("python-pyopenssl" ,python-pyopenssl)))
- (home-page "https://urllib3.readthedocs.org/")
+ ("python-pyopenssl" ,python-pyopenssl)
+ ("python-pysocks" ,python-pysocks)))
+ (home-page "https://urllib3.readthedocs.io/")
(synopsis "HTTP library with thread-safe connection pooling")
(description
"Urllib3 supports features left out of urllib and urllib2 libraries. It
(define-public python-wsgiproxy2
(package
(name "python-wsgiproxy2")
- (version "0.4.4")
+ (version "0.4.5")
(source
(origin
(method url-fetch)
(uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
(sha256
(base32
- "16532rjc94h3w74x52jfckf3yzsp8h6z34522jk4xgjy82hpnd7r"))))
+ "19d9dva282vfjs784i0zkxp078lxfz4h3f621z30ij9wbf5rba6a"))))
(build-system python-build-system)
(native-inputs
`(("python-webtest" ,python-webtest)))
(define-public python-webtest
(package
(name "python-webtest")
- (version "2.0.30")
+ (version "2.0.33")
(source
(origin
(method url-fetch)
(uri (pypi-uri "WebTest" version))
(sha256
(base32
- "1mb7m4ndklv84mh0pdkhv73yrflcnra61yczj5g3bvwbqlygfsaw"))))
+ "1l3z0cwqslsf4rcrhi2gr8kdfh74wn2dw76376i4g9i38gz8wd21"))))
(build-system python-build-system)
(arguments
- `(;; Unfortunately we have to disable tests!
- ;; This release of WebTest is pinned to python-nose < 1.3,
- ;; but older versions of python-nose are plagued with the following
- ;; bug(s), which rears its ugly head during test execution:
- ;; https://github.com/nose-devs/nose/issues/759
- ;; https://github.com/nose-devs/nose/pull/811
- #:tests? #f))
- ;; Commented out code is no good, but in this case, once tests
- ;; are ready to be enabled again, we should put the following
- ;; in place:
- ;; (native-inputs
- ;; `(("python-nose" ,python-nose) ; technially < 1.3,
- ;; ; but see above comment
- ;; ("python-coverage" ,python-coverage)
- ;; ("python-mock" ,python-mock)
- ;; ("python-pastedeploy" ,python-pastedeploy)
- ;; ("python-wsgiproxy2" ,python-wsgiproxy2)
- ;; ("python-pyquery" ,python-pyquery)))
+ ;; Tests require python-pyquery, which creates a circular dependency.
+ `(#:tests? #f))
(propagated-inputs
`(("python-waitress" ,python-waitress)
("python-webob" ,python-webob)
(define-public python-flask
(package
(name "python-flask")
- (version "0.11.1")
+ (version "1.0.2")
(source (origin
(method url-fetch)
- (uri (pypi-uri "Flask" version))
+ (uri (pypi-uri "flask" version))
(sha256
(base32
- "03kbfll4sj3v5z7r31c7bhfpi11r1np076d4p1k2kg4yzcmkywdl"))))
+ "0j6f4a9rpfh25k1gp7azqhnni4mb4fgy50jammgjgddw1l3w0w92"))))
(build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "python" "-m" "pytest"))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-itsdangerous" ,python-itsdangerous)
("python-jinja2" ,python-jinja2)
("python-click" ,python-click)
("python-werkzeug" ,python-werkzeug)))
- (home-page "https://github.com/mitsuhiko/flask/")
+ (home-page "https://www.palletsprojects.com/p/flask/")
(synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
(description "Flask is a micro web framework based on the Werkzeug toolkit
and Jinja2 template engine. It is called a micro framework because it does not
(define-public python2-responses
(package-with-python2 python-responses))
+(define-public python-grequests
+ (package
+ (name "python-grequests")
+ (version "0.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "grequests" version))
+ (sha256
+ (base32
+ "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-gevent" ,python-gevent)
+ ("python-requests" ,python-requests)))
+ (native-inputs
+ `(("python-nose" ,python-nose)))
+ (home-page "https://github.com/kennethreitz/grequests")
+ (synopsis "Python library for asynchronous HTTP requests")
+ (description "GRequests is a Python library that allows you to use
+@code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
+ (license license:bsd-2)))
+
(define-public python-geventhttpclient
(package
(name "python-geventhttpclient")
(add-after 'install 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(add-installed-pythonpath inputs outputs)
- (invoke "py.test" "src/geventhttpclient/tests" "-v")
+ (invoke "py.test" "src/geventhttpclient/tests" "-v"
+ ;; Append the test modules to sys.path to avoid
+ ;; namespace conflict which breaks SSL tests.
+ "--import-mode=append")
#t)))))
(native-inputs
`(("python-pytest" ,python-pytest)))
`(("python2-futures" ,python2-futures)
,@(package-native-inputs base))))))
+(define-public python-slimit
+ (package
+ (name "python-slimit")
+ (version "0.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "slimit" version ".zip"))
+ (sha256
+ (base32
+ "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (propagated-inputs
+ `(("python-ply" ,python-ply)))
+ (home-page "https://slimit.readthedocs.io/")
+ (synopsis "JavaScript minifier, parser and lexer written in Python")
+ (description
+ "SlimIt is a JavaScript minifier written in Python. It compiles
+JavaScript into more compact code so that it downloads and runs faster.
+SlimIt also provides a library that includes a JavaScript parser, lexer,
+pretty printer and a tree visitor.")
+ (license license:expat)))
+
(define-public python-flask-restful
(package
(name "python-flask-restful")
- (version "0.3.5")
+ (version "0.3.7")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Flask-RESTful" version))
(sha256
- (base32
- "0hjcmdb56b7z4bkw848lxfkyrpnkwzmqn2dgnlv12mwvjpzsxr6c"))))
+ (base32
+ "1a9cbwkr6krryyzq4sd3f415nkkc6dyfls5i3pgyibs94g0hw97q"))))
(build-system python-build-system)
(propagated-inputs
`(("python-aniso8601" ,python-aniso8601)
(define-public python2-flask-htmlmin
(package-with-python2 python-flask-htmlmin))
-(define-public python-flask-login
+(define-public python-jsmin
(package
- (name "python-flask-login")
- (version "0.4.0")
+ (name "python-jsmin")
+ (version "2.2.2")
(source
(origin
(method url-fetch)
- (uri (string-append "https://github.com/maxcountryman/flask-login/archive/"
- version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
+ (uri (pypi-uri "jsmin" version))
(sha256
(base32
- "1pdqp7a2gyb7k06xda004x0fi2w66s6kn2i0ndkqndmg12d83f9w"))))
+ "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/tikitu/jsmin/")
+ (synopsis "Python JavaScript minifier")
+ (description
+ "@code{jsmin} is a JavaScript minifier, usable from both Python code and
+on the command line.")
+ (license license:expat)))
+
+(define-public python-flask-login
+ (package
+ (name "python-flask-login")
+ (version "0.4.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/maxcountryman/flask-login.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1rj0qwyxapxnp84fi4lhmvh3d91fdiwz7hibw77x3d5i72knqaa9"))))
(arguments
- ;; Tests fail PEP8 compliance. See:
- ;; https://github.com/maxcountryman/flask-login/issues/340
- `(#:tests? #f))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'avoid-yanc
+ ;; Work around '.nosetests-real: error: no such option: --with-yanc'.
+ (lambda _
+ (setenv "NOCOLOR" "set")
+ #t)))))
(build-system python-build-system)
+ (propagated-inputs
+ `(("python-flask" ,python-flask)))
+ (native-inputs
+ ;; For tests.
+ `(("python-blinker" ,python-blinker)
+ ("python-mock" ,python-mock)
+ ("python-nose" ,python-nose)
+ ("python-pep8" ,python-pep8)
+ ("python-pyflakes" ,python-pyflakes)
+ ("python-semantic-version" ,python-semantic-version)
+ ("python-werkzeug" ,python-werkzeug)))
(home-page "https://github.com/maxcountryman/flask-login")
(synopsis "User session management for Flask")
(description
(define-public python-genshi
(package
(name "python-genshi")
- (version "0.7")
+ (version "0.7.1")
(source
(origin
- (method url-fetch)
- (uri (string-append
- "https://ftp.edgewall.org/pub/genshi/Genshi-"
- version ".tar.gz"))
- (patches
- (search-patches
- ;; The first 4 patches are in the master branch upstream.
- ;; See this as a reference https://genshi.edgewall.org/ticket/582
- ;; The last 2 are NOT in any branch.
- ;; They were sent as attachments to a ticket opened at
- ;; https://genshi.edgewall.org/ticket/602#no1
- "python-genshi-stripping-of-unsafe-script-tags.patch"
- "python-genshi-disable-speedups-on-python-3.3.patch"
- "python-genshi-isstring-helper.patch"
- "python-genshi-add-support-for-python-3.4-AST.patch"
- "python-genshi-fix-tests-on-python-3.5.patch"
- "python-genshi-buildable-on-python-2.7.patch"))
- (sha256
- (base32
- "0lkkbp6fbwzv0zda5iqc21rr7rdldkwh3hfabfjl9i4bwq14858x"))))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/edgewall/genshi.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "01fx8fnpay5w048ppyjivg2dgfpp5rybn07y3pfsgj2knram3nhl"))))
(build-system python-build-system)
(home-page "https://genshi.edgewall.org/")
(synopsis "Toolkit for generation of output for the web")
textual content for output generation on the web.")
(license license:bsd-3)))
-;; The linter here claims that patch file names should start with the package
-;; name. But, in this case the patches are inherited from python-genshi with
-;; the "python-genshi-" prefix instead of "python2-genshi-".
(define-public python2-genshi
(package-with-python2 python-genshi))
(define-public python-werkzeug
(package
(name "python-werkzeug")
- (version "0.11.15")
+ (version "0.14.1")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "Werkzeug" version))
+ (uri (pypi-uri "werkzeug" version))
(sha256
(base32
- "1h5wycw8yj7q0grqsjnsqflmrlsdagvl2j4dsgdncci6mjc7fpa5"))))
+ "0z2m4snn1vc9518r2vzgdj1nc90kcgi60wijvd29yvcp85ypmzf3"))))
(build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest"))))))
+ (propagated-inputs
+ `(("python-requests" ,python-requests)))
(native-inputs
`(("python-pytest" ,python-pytest)))
- (home-page "http://werkzeug.pocoo.org/")
+ (home-page "https://www.palletsprojects.org/p/werkzeug/")
(synopsis "Utilities for WSGI applications")
(description "One of the most advanced WSGI utility modules. It includes a
powerful debugger, full-featured request and response objects, HTTP utilities to
(define-public python-paste
(package
(name "python-paste")
- (version "2.0.3")
+ (version "3.0.6")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Paste" version))
(sha256
(base32
- "062jk0nlxf6lb2wwj6zc20rlvrwsnikpkh90y0dn8cjch93s6ii3"))
- (patches (search-patches "python-paste-remove-website-test.patch"
- "python-paste-remove-timing-test.patch"))))
+ "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
+ (patches (search-patches "python-paste-remove-timing-test.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; This test calls out to the internet.
+ (delete-file "tests/test_proxy.py") #t))))
(build-system python-build-system)
(native-inputs
- `(("python-nose" ,python-nose)))
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-runner" ,python-pytest-runner)
+ ("python-nose" ,python-nose)))
(propagated-inputs
`(("python-six" ,python-six)))
(home-page "http://pythonpaste.org")
(define-public python2-google-api-client
(package-with-python2 python-google-api-client))
+
+(define-public python-hawkauthlib
+ (package
+ (name "python-hawkauthlib")
+ (version "2.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hawkauthlib" version))
+ (sha256
+ (base32
+ "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-requests" ,python-requests)
+ ("python-webob" ,python-webob)))
+ (home-page "https://github.com/mozilla-services/hawkauthlib")
+ (synopsis "Hawk Access Authentication protocol")
+ (description
+ "This is a low-level Python library for implementing Hawk Access Authentication,
+a simple HTTP request-signing scheme.")
+ (license license:mpl2.0)))
+
+(define-public python-pybrowserid
+ (package
+ (name "python-pybrowserid")
+ (version "0.14.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "PyBrowserID" version))
+ (sha256
+ (base32
+ "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-requests" ,python-requests)))
+ (native-inputs
+ `(("python-mock" ,python-mock)))
+ (home-page "https://github.com/mozilla/PyBrowserID")
+ (synopsis "Python library for the BrowserID protocol")
+ (description
+ "This is a Python client library for the BrowserID protocol that
+underlies Mozilla Persona.")
+ (license license:mpl2.0)))
+
+(define-public python-pyfxa
+ (package
+ (name "python-pyfxa")
+ (version "0.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "PyFxA" version))
+ (sha256
+ (base32
+ "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
+ (build-system python-build-system)
+ (arguments '(#:tests? #f)) ; 17 tests require network access
+ (propagated-inputs
+ `(("python-cryptography" ,python-cryptography)
+ ("python-hawkauthlib" ,python-hawkauthlib)
+ ("python-pybrowserid" ,python-pybrowserid)
+ ("python-requests" ,python-requests)
+ ("python-six" ,python-six)))
+ (native-inputs
+ `(("python-grequests" ,python-grequests)
+ ("python-mock" ,python-mock)
+ ("python-responses" ,python-responses)
+ ("python-unittest2" ,python-unittest2)))
+ (home-page "https://github.com/mozilla/PyFxA")
+ (synopsis "Firefox Accounts client library for Python")
+ (description
+ "This is a Python library for interacting with the Firefox Accounts
+ecosystem.")
+ (license license:mpl2.0)))
+
+(define-public python-hyperlink
+ (package
+ (name "python-hyperlink")
+ (version "18.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "hyperlink" version))
+ (sha256
+ (base32
+ "01m3y19arfqljksngy8grc966zdb4larysralb8cajzi8kvly6zh"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-idna" ,python-idna)))
+ (home-page "https://github.com/python-hyper/hyperlink")
+ (synopsis "Python module to create immutable URLs according to spec")
+ (description "This package provides a Python module to create immutable, and
+correct URLs for Python according to RFCs 3986 and 3987.")
+ (license license:expat)))
+
+(define-public python-treq
+ (package
+ (name "python-treq")
+ (version "18.6.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "treq" version))
+ (sha256
+ (base32
+ "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-attrs" ,python-attrs)
+ ("python-idna" ,python-idna)
+ ("python-incremental" ,python-incremental)
+ ("python-requests" ,python-requests)
+ ("python-service-identity" ,python-service-identity)
+ ("python-twisted" ,python-twisted)))
+ (home-page "https://github.com/twisted/treq")
+ (synopsis "Requests-like API built on top of twisted.web's Agent")
+ (description "This package provides an HTTP library inspired by
+@code{requests}} but written on top of Twisted's @code{Agents}. It offers a
+high level API for making HTTP requests when using Twisted.")
+ (license license:expat)))
+
+(define-public python-autobahn
+ (package
+ (name "python-autobahn")
+ (version "19.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "autobahn" version))
+ (sha256
+ (base32
+ "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
+ (build-system python-build-system)
+ (arguments
+ ;; The tests fail to run:
+ ;; https://github.com/crossbario/autobahn-python/issues/1117
+ `(#:tests? #f))
+ (propagated-inputs
+ `(("python-cffi" ,python-cffi)
+ ("python-twisted" ,python-twisted)
+ ("python-txaio" ,python-txaio)))
+ (home-page "https://crossbar.io/autobahn/")
+ (synopsis "Web Application Messaging Protocol implementation")
+ (description "This package provides an implementation of the @dfn{Web Application
+Messaging Protocol} (WAMP). WAMP connects components in distributed
+applications using Publish and Subscribe (PubSub) and routed Remote Procedure
+Calls (rRPC). It is ideal for distributed, multi-client and server applications
+such as IoT applications or multi-user database-driven business applications.")
+ (license license:expat)))
+
+(define-public python-ws4py
+ (package
+ (name "python-ws4py")
+ (version "0.5.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ws4py" version))
+ (sha256
+ (base32
+ "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'python3.7-compatibility
+ (lambda _
+ (substitute* '("ws4py/server/tulipserver.py"
+ "ws4py/async_websocket.py")
+ (("asyncio.async")
+ "asyncio.ensure_future"))
+ #t))
+ ;; We don't have a package for cherrypy.
+ (add-after 'unpack 'remove-cherrypy-support
+ (lambda _
+ (delete-file "ws4py/server/cherrypyserver.py")
+ #t)))))
+ (propagated-inputs
+ `(("python-gevent" ,python-gevent)
+ ("python-tornado" ,python-tornado)))
+ (home-page "https://github.com/Lawouach/WebSocket-for-Python")
+ (synopsis "WebSocket client and server library")
+ (description
+ "This package provides a WebSocket client and server library for
+Python.")
+ (license license:bsd-3)))
+
+;; kaldi-gstreamer-server does not yet work with python-ws4py > 0.3.2
+(define-public python2-ws4py-for-kaldi-gstreamer-server
+ (package (inherit python-ws4py)
+ (name "python2-ws4py")
+ (version "0.3.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ws4py" version))
+ (sha256
+ (base32
+ "12ys3dv98awhrxd570vla3hqgzq3avjhq4yafhghhq3a942y1928"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2
+ #:phases
+ (modify-phases %standard-phases
+ ;; We don't have a package for cherrypy.
+ (add-after 'unpack 'remove-cherrypy-support
+ (lambda _
+ (delete-file "ws4py/server/cherrypyserver.py")
+ #t)))))
+ (propagated-inputs
+ `(("python-gevent" ,python2-gevent)
+ ("python-tornado" ,python2-tornado)))))