diff options
author | Danny Milosavljevic <dannym@scratchpost.org> | 2017-01-18 08:53:00 +0100 |
---|---|---|
committer | Danny Milosavljevic <dannym@scratchpost.org> | 2017-01-19 16:29:56 +0100 |
commit | 7adb90311f8ce5e44c5bd1ecba28dcb26bfabebe (patch) | |
tree | 8b99a7f843c737ee9f2dd543633c527aec2a0752 | |
parent | d83d87225980cec4926aec03280ad3533b778281 (diff) | |
download | patches-7adb90311f8ce5e44c5bd1ecba28dcb26bfabebe.tar patches-7adb90311f8ce5e44c5bd1ecba28dcb26bfabebe.tar.gz |
gnu: python-testtools: Update to 1.4.0.
* gnu/packages/python.scm (python-testtools): Update to 1.4.0.
[source]: Use pypi-uri.
[arguments]: New field.
-rw-r--r-- | gnu/packages/python.scm | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 7c4996ce4b..80d03f6b0a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1983,17 +1983,36 @@ subprocess and see the output as well as any file modifications.") (define-public python-testtools (package (name "python-testtools") - (version "1.0.0") + (version "1.4.0") (source (origin (method url-fetch) - (uri (string-append - "https://pypi.python.org/packages/source/t/testtools/testtools-" - version ".tar.gz")) + (uri (pypi-uri "testtools" version)) (sha256 (base32 - "1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx")))) + "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-module-imports + (lambda _ + (substitute* "setup.py" + (("'unittest2>=0.8.0',") "")) + (substitute* '("testtools/testcase.py" + "testtools/testsuite.py" + "testtools/run.py" + "testtools/tests/test_run.py" + "testtools/tests/test_testsuite.py" + "testtools/tests/test_deferredruntest.py") + ;; unittest2 is a backport of Python2.7 features to Python 2.4. + (("import unittest2 as unittest") "import unittest") + (("import unittest2") "import unittest as unittest2") + (("from unittest2 import") "from unittest import")) + (substitute* "testtools/tests/test_testresult.py" + ;; NUL in source code is not allowed (raises ValueError). + (("\\x00\\x04") "\\x04")) + #t))))) (propagated-inputs `(("python-mimeparse" ,python-mimeparse) ("python-extras" ,python-extras))) |