all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: "Stefan Reichör" <stefan@xsteve.at>, 28151@debbugs.gnu.org
Subject: [bug#28151] [PATCH] gnu: Add honcho.
Date: Tue, 22 Aug 2017 22:21:09 +0200	[thread overview]
Message-ID: <87pobn2w22.fsf@fastmail.com> (raw)
In-Reply-To: <87378jo0cz.fsf@xsteve.at>

[-- Attachment #1: Type: text/plain, Size: 2385 bytes --]

Stefan Reichör <stefan@xsteve.at> writes:

> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Stefan Reichör <stefan@xsteve.at> 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/store/bf54hnwd8mb63zmssc23fwslf5zvxpxs-python-wrapper-3.5.3/bin/python
> | rootdir: /tmp/guix-build-python-honcho-1.0.1.drv-0/honcho-1.0.1, inifile: 
> | 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 :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  parent reply	other threads:[~2017-08-22 20:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-19 19:49 [bug#28151] [PATCH] gnu: Add honcho Stefan Reichör
2017-08-21 22:00 ` Marius Bakke
2017-08-22 19:42   ` Stefan Reichör
2017-08-22 20:08     ` Stefan Reichör
2017-08-22 20:21     ` Marius Bakke [this message]
2017-08-23 20:23       ` Stefan Reichör
2017-08-24 19:29         ` bug#28151: " Marius Bakke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pobn2w22.fsf@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=28151@debbugs.gnu.org \
    --cc=stefan@xsteve.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.