From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: [PATCH v2 1/6] gnu: python-testtools: Update to 1.4.0. Date: Wed, 18 Jan 2017 08:53:00 +0100 Message-ID: <20170118075305.29573-2-dannym@scratchpost.org> References: <8737gxxza3.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <20170118075305.29573-1-dannym@scratchpost.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTl41-0001Eu-Dl for guix-devel@gnu.org; Wed, 18 Jan 2017 02:53:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTl3y-0007MJ-B6 for guix-devel@gnu.org; Wed, 18 Jan 2017 02:53:49 -0500 Received: from dd1012.kasserver.com ([85.13.128.8]:59504) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cTl3y-0007JJ-3a for guix-devel@gnu.org; Wed, 18 Jan 2017 02:53:46 -0500 In-Reply-To: <20170118075305.29573-1-dannym@scratchpost.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/python.scm (python-testtools): Update to 1.4.0. [source]: Use pypi-uri. [arguments]: New field. --- gnu/packages/python.scm | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9a44b5881..d53a10116 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1982,17 +1982,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)))