aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-01-11 23:33:01 +0200
committerEfraim Flashner <efraim@flashner.co.il>2020-01-11 23:49:10 +0200
commit1e158ba15653a06601b6443740007e6ce8917aea (patch)
tree29ecbc0d95dec0df3cf822b6d4417eed15d209da /gnu/packages/python-xyz.scm
parent13efb24850bc40fab2448771c87c77c9a69fc231 (diff)
downloadpatches-1e158ba15653a06601b6443740007e6ce8917aea.tar
patches-1e158ba15653a06601b6443740007e6ce8917aea.tar.gz
gnu: python2-contextlib2: Inherit from python-contextlib2.
* gnu/packages/python-xyz.scm (python2-contextlib2): Inherit from python-contextlib2. (python-contextlib2)[properties]: New field.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm40
1 files changed, 13 insertions, 27 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d6b9477b43..2c308796e7 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -8238,36 +8238,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