guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#28151] [PATCH] gnu: Add honcho.


From: Marius Bakke
Subject: [bug#28151] [PATCH] gnu: Add honcho.
Date: Tue, 22 Aug 2017 22:21:09 +0200
User-agent: Notmuch/0.25 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu)

Stefan Reichör <address@hidden> writes:

> Marius Bakke <address@hidden> writes:
>
>> Stefan Reichör <address@hidden> 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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]