[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/20: gnu: python-unittest2: Update to 1.1.0.
From: |
Marius Bakke |
Subject: |
19/20: gnu: python-unittest2: Update to 1.1.0. |
Date: |
Wed, 18 Oct 2017 18:19:43 -0400 (EDT) |
mbakke pushed a commit to branch python-updates
in repository guix.
commit 7439173f2c1b561e0e4a2f877e65f2b53c2c2fe9
Author: Marius Bakke <address@hidden>
Date: Mon Jul 31 03:24:50 2017 +0200
gnu: python-unittest2: Update to 1.1.0.
* gnu/packages/python.scm (python-unittest2): Update to 1.1.0.
[source]: Use PYPI-URI. Add two patches.
[arguments]: Add phase to run tests.
[propagated-inputs]: Add PYTHON-SIX and PYTHON-TRACEBACK2.
(python2-unittest2): Use 'package-with-python2'.
* gnu/packages/patches/python2-unittest2-remove-argparse.patch: Rename to
...
* gnu/packages/patches/python2-unittest2-remove-argparse.patch: ... this.
* gnu/packages/patches/python-unittest2-python3-compat.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
---
gnu/local.mk | 3 +-
.../patches/python-unittest2-python3-compat.patch | 34 ++++++++++++++++++
...atch => python-unittest2-remove-argparse.patch} | 0
gnu/packages/python.scm | 41 +++++++++-------------
4 files changed, 52 insertions(+), 26 deletions(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 7345a5e..28ee260 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -996,7 +996,8 @@ dist_patch_DATA =
\
%D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \
%D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \
%D%/packages/patches/python2-subprocess32-disable-input-test.patch \
- %D%/packages/patches/python2-unittest2-remove-argparse.patch \
+ %D%/packages/patches/python-unittest2-python3-compat.patch \
+ %D%/packages/patches/python-unittest2-remove-argparse.patch \
%D%/packages/patches/qt4-ldflags.patch \
%D%/packages/patches/qtscript-disable-tests.patch \
%D%/packages/patches/quagga-reproducible-build.patch \
diff --git a/gnu/packages/patches/python-unittest2-python3-compat.patch
b/gnu/packages/patches/python-unittest2-python3-compat.patch
new file mode 100644
index 0000000..fe0afe5
--- /dev/null
+++ b/gnu/packages/patches/python-unittest2-python3-compat.patch
@@ -0,0 +1,34 @@
+Skip tests that fail with newer versions of Python.
+
+Patch copied from Gentoo:
+
+https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-python/unittest2/files/unittest2-1.1.0-python3.5-test.patch
+
+diff --git a/unittest2/test/test_loader.py b/unittest2/test/test_loader.py
+index 683f662..347eea5 100644
+--- a/unittest2/test/test_loader.py
++++ b/unittest2/test/test_loader.py
+@@ -509,6 +509,7 @@ class Test_TestLoader(unittest2.TestCase):
+ #
+ # What happens when an impossible name is given, relative to the provided
+ # `module`?
++ @unittest.skipIf(sys.version_info[:2] >= (3, 5), "python 3.5 has problems
here")
+ def test_loadTestsFromName__relative_malformed_name(self):
+ loader = unittest.TestLoader()
+
+@@ -811,6 +812,7 @@ class Test_TestLoader(unittest2.TestCase):
+ # TestCase or TestSuite instance."
+ #
+ # What happens when presented with an impossible module name?
++ @unittest.skipIf(sys.version_info[:2] >= (3, 5), "python 3.5 has problems
here")
+ def test_loadTestsFromNames__malformed_name(self):
+ loader = unittest2.TestLoader()
+
+@@ -918,6 +920,7 @@ class Test_TestLoader(unittest2.TestCase):
+ # "The method optionally resolves name relative to the given module"
+ #
+ # What happens when presented with an impossible attribute name?
++ @unittest.skipIf(sys.version_info[:2] >= (3, 5), "python 3.5 has problems
here")
+ def test_loadTestsFromNames__relative_malformed_name(self):
+ loader = unittest.TestLoader()
+
diff --git a/gnu/packages/patches/python2-unittest2-remove-argparse.patch
b/gnu/packages/patches/python-unittest2-remove-argparse.patch
similarity index 100%
rename from gnu/packages/patches/python2-unittest2-remove-argparse.patch
rename to gnu/packages/patches/python-unittest2-remove-argparse.patch
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9a8432e..537567b 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1866,17 +1866,27 @@ interfaces and processes.")
(define-public python-unittest2
(package
(name "python-unittest2")
- (version "0.5.1")
+ (version "1.1.0")
(source
(origin
(method url-fetch)
- (uri (string-append
-
"https://pypi.python.org/packages/source/u/unittest2py3k/unittest2py3k-"
- version ".tar.gz"))
+ (uri (pypi-uri "unittest2" version))
+ (patches
+ (search-patches "python-unittest2-python3-compat.patch"
+ "python-unittest2-remove-argparse.patch"))
(sha256
(base32
- "00yl6lskygcrddx5zspkhr0ibgvpknl4678kkm6s626539grq93q"))))
+ "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))))
(build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (zero? (system* "python" "-m" "unittest2" "discover"
"--verbose")))))))
+ (propagated-inputs
+ `(("python-six" ,python-six)
+ ("python-traceback2" ,python-traceback2)))
(home-page "http://pypi.python.org/pypi/unittest2")
(synopsis "Python unit testing library")
(description
@@ -1885,26 +1895,7 @@ standard library.")
(license license:psfl)))
(define-public python2-unittest2
- (package (inherit python-unittest2)
- (name "python2-unittest2")
- (version "1.1.0")
- (source
- (origin
- (method url-fetch)
- (uri (string-append
- "https://pypi.python.org/packages/source/u/unittest2/unittest2-"
- version ".tar.gz"))
- (sha256
- (base32
- "0y855kmx7a8rnf81d3lh5lyxai1908xjp0laf4glwa4c8472m212"))
- (patches
- (search-patches "python2-unittest2-remove-argparse.patch"))))
- (propagated-inputs
- `(("python2-six" ,python2-six)
- ("python2-traceback2" ,python2-traceback2)))
- (arguments
- `(#:python ,python-2
- #:tests? #f)))) ; no setup.py test command
+ (package-with-python2 python-unittest2))
(define-public python-pafy
(package
- 18/20: gnu: python-jinja2: Remove workaround for < Python 3.6., (continued)
- 18/20: gnu: python-jinja2: Remove workaround for < Python 3.6., Marius Bakke, 2017/10/18
- 15/20: gnu: python-flake8: Update to 3.4.1., Marius Bakke, 2017/10/18
- 06/20: gnu: Remove address@hidden, Marius Bakke, 2017/10/18
- 12/20: gnu: address@hidden: Add dependency on python-six., Marius Bakke, 2017/10/18
- 11/20: gnu: python-mccabe: Update to 0.6.1., Marius Bakke, 2017/10/18
- 01/20: gnu: address@hidden: Update to 2.7.14., Marius Bakke, 2017/10/18
- 20/20: gnu: python-coverage: Update to 4.4.1., Marius Bakke, 2017/10/18
- 16/20: gnu: Add python2-funcsigs., Marius Bakke, 2017/10/18
- 13/20: gnu: Fix pytest dependency cycle., Marius Bakke, 2017/10/18
- 14/20: gnu: Add python2-enum., Marius Bakke, 2017/10/18
- 19/20: gnu: python-unittest2: Update to 1.1.0.,
Marius Bakke <=
- 02/20: gnu: address@hidden: Update to 3.6.3., Marius Bakke, 2017/10/18