From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: Re: [PATCH 8/8] gnu: python-dulwich: Fix tests. Date: Tue, 17 Jan 2017 23:55:50 +0100 Message-ID: <87wpdt9tzd.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> References: <20170117222548.13995-1-dannym@scratchpost.org> <20170117222548.13995-9-dannym@scratchpost.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTcfV-00077i-6s for guix-devel@gnu.org; Tue, 17 Jan 2017 17:55:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTcfR-0006t5-9M for guix-devel@gnu.org; Tue, 17 Jan 2017 17:55:57 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38089) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cTcfR-0006sm-5G for guix-devel@gnu.org; Tue, 17 Jan 2017 17:55:53 -0500 In-Reply-To: <20170117222548.13995-9-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: Danny Milosavljevic , guix-devel@gnu.org --=-=-= Content-Type: text/plain Danny Milosavljevic writes: > * gnu/packages/python.scm (python-dulwich)[arguments]: New field. > --- > gnu/packages/python.scm | 26 +++++++++++++++++++++++++- > 1 file changed, 25 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm > index cd0a47043..232e033c7 100644 > --- a/gnu/packages/python.scm > +++ b/gnu/packages/python.scm > @@ -12709,11 +12709,35 @@ Features: > (sha256 > (base32 "0fl47vzfgc3w3rmhn8naii905cjqcp0vc68iyvymxp7567hh6als")))) > (build-system python-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (replace 'check > + (lambda* (#:key inputs #:allow-other-keys) > + (substitute* "dulwich/tests/compat/utils.py" > + (("'git'") (string-append "'" > + (assoc-ref inputs "git") > + "/bin/git'"))) > + ;(substitute* "dulwich/hooks.py" > + ; (("f[.]write[(]args[[]0[]][)]") "f.write(args[0].encode('utf-8'))")) > + (substitute* '("dulwich/tests/test_repository.py" > + "dulwich/tests/test_hooks.py") > + (("#!/bin/sh") (string-append "#!" (which "sh")))) > + (setenv "TEST_RUNNER" "unittest") > + (setenv "PYTHONHASHSEED" "random") > + (and > + ;; Test without c extensions > + ;; FIXME someone already called build_ext. > + ;(zero? (system* "python" "-m" "unittest" "dulwich.tests.test_suite")) > + ;; Test with c extensions > + ;(zero? (system* "python" "setup.py" "build_ext" "-i")) I think build_ext is called as part of the regular build process. Why does it need to be called again (with the -i flag)? Maybe tests can be run after install instead, with the add-installed-pythonpath trick? Otherwise LGTM, assuming this will be squashed into the dulwich commit. > + (zero? (system* "python" "-m" "unittest" "dulwich.tests.test_suite")))))))) > (propagated-inputs > `(("python-fastimport" ,python-fastimport))) > (native-inputs > `(("python-mock" ,python-mock) > - ("python-geventhttpclient" ,python-geventhttpclient))) > + ("python-geventhttpclient" ,python-geventhttpclient) > + ("git" ,git))) > (home-page "https://www.dulwich.io/") > (synopsis "Python git library") > (description "This package provides a Git library for Python.") --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlh+oPcACgkQoqBt8qM6 VPqxXAf/cOkg1TD6gvPfWgdX7I+xdNGdOQUTSyjpI24eWNlHX+wjoeQfPQkKmujL jskaBnH5je9bvhP2mo/j+aUP7xRkEbM/6KpuxIw9qLkxKcBdBLvznV7SGCCiY7ma iaEtEEn6jJbk9HDCtE6oA2+oRPxtP8EAuyPukVmYiZZ/u7L/Tqn+hEv3/g4MLf5x LoqLMTud4N4THHb3SIafwg4STKRsJ4i39Ahp67bfsYYw1JMWG9iZCrS0UNcqy2Cl APdu2t5AFUqwbGgGXzUHeSnXvGxw/gjtM4cjbeQZCxs91U28kTHlErDc9DL/vjCw R3rrbePx2cfp24LYGG0O91q2nk8tzA== =2iF0 -----END PGP SIGNATURE----- --=-=-=--