unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: Danny Milosavljevic <dannym@scratchpost.org>, guix-devel@gnu.org
Subject: Re: [PATCH 8/8] gnu: python-dulwich: Fix tests.
Date: Tue, 17 Jan 2017 23:55:50 +0100	[thread overview]
Message-ID: <87wpdt9tzd.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <20170117222548.13995-9-dannym@scratchpost.org>

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

Danny Milosavljevic <dannym@scratchpost.org> 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.")

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

  reply	other threads:[~2017-01-17 22:55 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gu878tqpjw93.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me>
2017-01-17 22:25 ` [PATCH 0/8] Make python-oslosphinx work in python-tests branch Danny Milosavljevic
2017-01-17 22:25   ` [PATCH 1/8] gnu: python-oslosphinx: Update to 4.9.0 Danny Milosavljevic
2017-01-17 22:25   ` [PATCH 2/8] gnu: Add python-reno Danny Milosavljevic
2017-01-17 22:36     ` Marius Bakke
2017-01-17 23:42     ` Hartmut Goebel
2017-01-17 22:25   ` [PATCH 3/8] gnu: python-requests: Update to 2.10.0 Danny Milosavljevic
2017-01-17 22:38     ` Marius Bakke
2017-01-17 23:03       ` Danny Milosavljevic
2017-01-17 22:25   ` [PATCH 4/8] gnu: Add python-dulwich Danny Milosavljevic
2017-01-17 22:43     ` Marius Bakke
2017-01-17 22:25   ` [PATCH 5/8] gnu: Add python-geventhttpclient Danny Milosavljevic
2017-01-17 22:48     ` Marius Bakke
2017-01-17 23:12       ` Danny Milosavljevic
2017-01-17 23:23         ` Marius Bakke
2017-01-17 22:25   ` [PATCH 6/8] gnu: Add python-fastimport Danny Milosavljevic
2017-01-17 22:50     ` Marius Bakke
2017-01-17 22:25   ` [PATCH 7/8] gnu: python-oslosphinx: Add python-reno Danny Milosavljevic
2017-01-17 22:51     ` Marius Bakke
2017-01-17 22:25   ` [PATCH 8/8] gnu: python-dulwich: Fix tests Danny Milosavljevic
2017-01-17 22:55     ` Marius Bakke [this message]
2017-01-17 22:58       ` Danny Milosavljevic
2017-01-17 23:38     ` Hartmut Goebel
2017-01-17 22:31   ` [PATCH 0/8] Make python-oslosphinx work in python-tests branch Marius Bakke
2017-01-17 22:46     ` Danny Milosavljevic
2017-01-17 22:56     ` Danny Milosavljevic
2017-01-17 23:17       ` Marius Bakke
2017-01-17 23:28         ` Danny Milosavljevic
2017-01-17 23:46           ` Danny Milosavljevic
2017-01-18  0:18             ` Danny Milosavljevic
2017-01-18  0:07           ` Marius Bakke
2017-01-18  0:32   ` ng0
2017-01-19  9:48     ` Danny Milosavljevic

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87wpdt9tzd.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me \
    --to=mbakke@fastmail.com \
    --cc=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).