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.
This commit is contained in:
Danny Milosavljevic 2017-01-18 08:53:00 +01:00
parent d83d872259
commit 7adb90311f
No known key found for this signature in database
GPG Key ID: E71A35542C30BAA5
1 changed files with 24 additions and 5 deletions

View File

@ -1983,17 +1983,36 @@ subprocess and see the output as well as any file modifications.")
(define-public python-testtools (define-public python-testtools
(package (package
(name "python-testtools") (name "python-testtools")
(version "1.0.0") (version "1.4.0")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (pypi-uri "testtools" version))
"https://pypi.python.org/packages/source/t/testtools/testtools-"
version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1dyml28ykpl5jb9khdmcdvhy1cxqingys6qvj2k04fzlaj6z3bbx")))) "1vw8yljnd75d396hhw6s2hrf4cclzy845ifd5am0lxsl235z3i8c"))))
(build-system python-build-system) (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 (propagated-inputs
`(("python-mimeparse" ,python-mimeparse) `(("python-mimeparse" ,python-mimeparse)
("python-extras" ,python-extras))) ("python-extras" ,python-extras)))