aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Marusich <cmmarusich@gmail.com>2015-12-07 21:07:40 -0800
committerLudovic Courtès <ludo@gnu.org>2015-12-14 09:43:24 +0100
commit03f964a511b1c2c0129a580e51ca72bf18a70d3a (patch)
treef82b9a9669c7c96fc84414882d322349e01a1ef3
parentb431e3a08dd2dd98cd985b83481dd44ffe24d7d5 (diff)
downloadguix-03f964a511b1c2c0129a580e51ca72bf18a70d3a.tar
guix-03f964a511b1c2c0129a580e51ca72bf18a70d3a.tar.gz
gnu: Add python-contextlib2.
* gnu/packages/python.scm (python-contextlib2, python2-contextlib2): New variables. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/python.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 5880cac099..b94dc1dbcc 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -16,6 +16,7 @@
;;; Copyright © 2015 Erik Edrosa <erik.edrosa@gmail.com>
;;; Copyright © 2015 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
+;;; Copyright © 2015 Chris Marusich <cmmarusich@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -6616,3 +6617,34 @@ of the SSL peer.")
(arguments `(#:python ,python-2))
(propagated-inputs
`(("python2-pyopenssl" ,python2-pyopenssl)))))
+
+(define-public python-contextlib2
+ (package
+ (name "python-contextlib2")
+ (version "0.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "contextlib2" version))
+ (sha256
+ (base32
+ "0cmp131dlh0d0zvw0aza1zd13glvngzk8lb4avks0hm7yxwdr9am"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _ (zero?
+ (system*
+ "python" "test_contextlib2.py", "-v")))))))
+ (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 psfl)))
+
+(define-public python2-contextlib2
+ (package-with-python2 python-contextlib2))