summary refs log tree commit diff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm73
1 files changed, 29 insertions, 44 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index daa57888bb..7c52a2e506 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8249,36 +8249,22 @@ be set via config files and/or environment variables.")
 provides utilities for common tasks involving decorators and context
 managers.  It also contains additional features that are not part of
 the standard library.")
+    (properties `((python2-variant . ,(delay python2-contextlib2))))
     (license license:psfl)))
 
 (define-public python2-contextlib2
-  (package
-    (name "python2-contextlib2")
-    (version "0.5.5")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "contextlib2" version))
-       (sha256
-        (base32
-         "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:python ,python-2
-       #:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
-    (native-inputs
-     `(("python2-unittest2" ,python2-unittest2)))
-    (home-page "http://contextlib2.readthedocs.org/")
-    (synopsis "Tools for decorators and context managers")
-    (description "This module is primarily a backport of the Python
-3.2 contextlib to earlier Python versions.  Like contextlib, it
-provides utilities for common tasks involving decorators and context
-managers.  It also contains additional features that are not part of
-the standard library.")
-    (license license:psfl)))
+  (let ((base (package-with-python2
+               (strip-python2-variant python-contextlib2))))
+    (package
+      (inherit base)
+      (arguments
+       (substitute-keyword-arguments (package-arguments base)
+         ((#:phases phases)
+          `(modify-phases ,phases
+           (replace 'check
+             (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
+      (native-inputs
+       `(("python2-unittest2" ,python2-unittest2))))))
 
 (define-public python-texttable
   (package
@@ -10314,25 +10300,24 @@ are optionally backed by a C extension built on librdkafka.")
   (package-with-python2 python-pykafka))
 
 (define-public python-wcwidth
- (package
-  (name "python-wcwidth")
-  (version "0.1.7")
-  (source
-    (origin
-      (method url-fetch)
-      (uri (pypi-uri "wcwidth" version))
-      (sha256
-        (base32
-          "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
-  (build-system python-build-system)
-  (home-page "https://github.com/jquast/wcwidth")
-  (synopsis "Measure number of terminal column cells of wide-character codes")
-  (description "Wcwidth measures the number of terminal column cells of
+  (package
+    (name "python-wcwidth")
+    (version "0.1.8")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "wcwidth" version))
+              (sha256
+               (base32
+                "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/jquast/wcwidth")
+    (synopsis "Measure number of terminal column cells of wide-character codes")
+    (description "Wcwidth measures the number of terminal column cells of
 wide-character codes.  It is useful for those implementing a terminal emulator,
 or programs that carefully produce output to be interpreted by one.  It is a
 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
 specified in POSIX.1-2001 and POSIX.1-2008.")
-  (license license:expat)))
+    (license license:expat)))
 
 (define-public python2-wcwidth
   (package-with-python2 python-wcwidth))
@@ -13075,14 +13060,14 @@ several utilities, as well as an API for building localization tools.")
 (define-public python-packaging
   (package
     (name "python-packaging")
-    (version "19.2")
+    (version "20.0")
     (source
       (origin
         (method url-fetch)
         (uri (pypi-uri "packaging" version))
         (sha256
          (base32
-          "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
+          "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
     (build-system python-build-system)
     (arguments
      `(#:phases (modify-phases %standard-phases