aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-02-28 00:02:53 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-02-28 13:59:01 +0100
commit3e3302acc51aca4415b394b067e69249d3f11e06 (patch)
tree38a43171a0b0baf35b53258d79ad406a40a11c6d
parent79d9effa51cd8a68cc0afbf3a9c2bfb4bddbeb64 (diff)
downloadpatches-3e3302acc51aca4415b394b067e69249d3f11e06.tar
patches-3e3302acc51aca4415b394b067e69249d3f11e06.tar.gz
gnu: Add python-rfc3986.
* gnu/packages/python.scm (python-rfc3986, python2-rfc3986): New public variables.
-rw-r--r--gnu/packages/python.scm42
1 files changed, 42 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5c6bc7f04e..ee867517fc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -11500,6 +11500,48 @@ applying JSON Patches according to RFC 6902.")
(define-public python2-jsonpatch-0.4
(package-with-python2 python-jsonpatch-0.4))
+(define-public python-rfc3986
+ (package
+ (name "python-rfc3986")
+ (version "1.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "rfc3986" version))
+ (sha256
+ (base32
+ "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:modules ((guix build utils)
+ (guix build python-build-system)
+ (ice-9 ftw)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (let ((cwd (getcwd)))
+ (setenv "PYTHONPATH"
+ (string-append cwd "/build/"
+ (find (cut string-prefix? "lib" <>)
+ (scandir (string-append cwd "/build")))
+ ":"
+ (getenv "PYTHONPATH")))
+ (invoke "pytest" "-v")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://rfc3986.readthedocs.io/")
+ (synopsis "Parse and validate URI references")
+ (description
+ "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
+validation and authority parsing. This module also supports RFC@tie{}6874
+which adds support for zone identifiers to IPv6 addresses.")
+ (license license:asl2.0)))
+
+(define-public python2-rfc3986
+ (package-with-python2 python-rfc3986))
+
(define-public python-rfc3987
(package
(name "python-rfc3987")