From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkFgc-0005l8-1N for guix-patches@gnu.org; Tue, 22 Aug 2017 16:22:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkFgY-0004aH-Pn for guix-patches@gnu.org; Tue, 22 Aug 2017 16:22:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:41244) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dkFgY-0004a1-HX for guix-patches@gnu.org; Tue, 22 Aug 2017 16:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dkFgY-0002zw-Bx for guix-patches@gnu.org; Tue, 22 Aug 2017 16:22:02 -0400 Subject: [bug#28151] [PATCH] gnu: Add honcho. Resent-Message-ID: From: Marius Bakke In-Reply-To: <87378jo0cz.fsf@xsteve.at> References: <87valj72yp.fsf@xsteve.at> <87378k4m57.fsf@fastmail.com> <87378jo0cz.fsf@xsteve.at> Date: Tue, 22 Aug 2017 22:21:09 +0200 Message-ID: <87pobn2w22.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Stefan =?UTF-8?Q?Reich=C3=B6r?= , 28151@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Stefan Reich=C3=B6r writes: > Marius Bakke writes: > >> Stefan Reich=C3=B6r writes: >> >>> * gnu/packages/python.scm (python-honcho): New variable. >> >> Thanks! I noticed this runs no tests, can you try to add a phase that >> invokes "pytest" instead of relying on the default "setup.py test"? >> >> It looks like it might require some extra (native) inputs, but they >> should already be in Guix: >> >> https://github.com/nickstenning/honcho/blob/master/tox.ini#L17 > > I tried to add a py.test check phase. But I failed. > > By reading python.scm I found two ways to do such tests > > a) before installation > (arguments > '(#:phases > (modify-phases %standard-phases > (replace 'check > (lambda _ > (zero? (system* "py.test" "-vv" ))))))) > > b) after installation > (arguments > `(#:phases > (modify-phases %standard-phases > (delete 'check) > (add-after 'install 'check > (lambda* (#:key outputs inputs #:allow-other-keys) > ;; It's easier to run tests after install. > ;; Make installed package available for running the tests > (add-installed-pythonpath inputs outputs) > (zero? (system* "py.test" "-vv"))))))) > > > I added the following to get pytest dependencies in: > (native-inputs > `(("python-pytest" ,python-pytest) > ("python-mock" ,python-mock) > ("python-tox" ,python-tox))) ;for tests > > Both ways have the same effect: They don't collect any tests: > ,---- > | platform linux -- Python 3.5.3 -- py-1.4.32 -- pytest-2.7.3 -- /gnu/sto= re/bf54hnwd8mb63zmssc23fwslf5zvxpxs-python-wrapper-3.5.3/bin/python > | rootdir: /tmp/guix-build-python-honcho-1.0.1.drv-0/honcho-1.0.1, inifil= e:=20 > | collecting ... collected 0 items > `---- Aaah, sorry. I was browsing the GitHub source code and failed to notice that the distribution tarball on PyPi does not contain any tests. So we can either switch to using the GitHub snapshots so that we can notice breakage early, or lose tests but gain the integrity guarantees from using the PGP-signed tarball on PyPi. I don't really have a strong preference, but it's worth creating an upstream issue in either case IMO. Ideally we'd have both. I'll let you be the judge, being the end user and all :) --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlmckjUACgkQoqBt8qM6 VPox9wf+LWor9sUXTs5HT02oZ+7g6Gn/fLSQit5jvSyE8tHRDJLUhKSUMLwwhrrG auuodbBSmnxWf/GPeoXG4rj24h0+vxUbjP0O0R31HQepKzyDVnX8KE3NaCy3+r0U nMF4vtOXTMQLnXeS7gl01u5NsEx2uOs2yHy7OQIEzdGZMud8QBhZ/G642mKZ2+7z SgWyEtVwW8kB2CnDF0leTCJXCEKXW/+uN5yXIHgg+rk6+KY4OHhFUlPVmhlcAAVr MVzhtXbTydE03akckPGvgXrTcwg6kC2ZFtsf6dqHhvnSadl+VPpHkcAeFEgXS2u+ IcNcOvSe7u+8iF5FJzjdSClvFHiEHQ== =LXHO -----END PGP SIGNATURE----- --=-=-=--