[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 8/8] gnu: python-dulwich: Fix tests.
From: |
Marius Bakke |
Subject: |
Re: [PATCH 8/8] gnu: python-dulwich: Fix tests. |
Date: |
Tue, 17 Jan 2017 23:55:50 +0100 |
User-agent: |
Notmuch/0.23.5 (https://notmuchmail.org) Emacs/25.1.1 (x86_64-unknown-linux-gnu) |
Danny Milosavljevic <address@hidden> 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.")
signature.asc
Description: PGP signature
- [PATCH 2/8] gnu: Add python-reno., (continued)
- [PATCH 2/8] gnu: Add python-reno., Danny Milosavljevic, 2017/01/17
- [PATCH 4/8] gnu: Add python-dulwich., Danny Milosavljevic, 2017/01/17
- [PATCH 6/8] gnu: Add python-fastimport., Danny Milosavljevic, 2017/01/17
- [PATCH 7/8] gnu: python-oslosphinx: Add python-reno., Danny Milosavljevic, 2017/01/17
- [PATCH 8/8] gnu: python-dulwich: Fix tests., Danny Milosavljevic, 2017/01/17
- Re: [PATCH 0/8] Make python-oslosphinx work in python-tests branch., Marius Bakke, 2017/01/17