diff options
author | Marius Bakke <mbakke@fastmail.com> | 2017-07-01 21:48:06 +0200 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2017-07-04 02:52:25 +0200 |
commit | 295f32f34b45d4df6c06d241d0ac1572ff5ed4cc (patch) | |
tree | 1eb24d82fe216634f755a1efe4c3f3d915915293 /gnu | |
parent | 92d7e87c5922bac7746f201f2ccb028cc5e7aaee (diff) | |
download | patches-295f32f34b45d4df6c06d241d0ac1572ff5ed4cc.tar patches-295f32f34b45d4df6c06d241d0ac1572ff5ed4cc.tar.gz |
gnu: python-cffi: Really enable tests.
* gnu/packages/python.scm (python-cffi, python2-cffi)[arguments]: Replace
'check' phase with custom expression. Change to 'modify-phases' syntax.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/python.scm | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 3e71a23bcf..a55cdafa25 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4781,19 +4781,31 @@ a front-end for C compilers or analysis tools.") ("python-sphinx" ,python-sphinx) ("python-pytest" ,python-pytest))) (arguments - `(#:phases - (alist-cons-after - 'install 'install-doc - (lambda* (#:key outputs #:allow-other-keys) - (let* ((data (string-append (assoc-ref outputs "doc") "/share")) - (doc (string-append data "/doc/" ,name "-" ,version)) - (html (string-append doc "/html"))) - (with-directory-excursion "doc" - (system* "make" "html") - (mkdir-p html) - (copy-recursively "build/html" html)) - (copy-file "LICENSE" (string-append doc "/LICENSE")))) - %standard-phases))) + `(#:modules ((ice-9 ftw) + (srfi srfi-26) + (guix build utils) + (guix build python-build-system)) + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (setenv "PYTHONPATH" + (string-append + (getenv "PYTHONPATH") + ":" (getcwd) "/build/" + (car (scandir "build" (cut string-prefix? "lib." <>))))) + (zero? (system* "py.test" "-v")))) + (add-after 'install 'install-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((data (string-append (assoc-ref outputs "doc") "/share")) + (doc (string-append data "/doc/" ,name "-" ,version)) + (html (string-append doc "/html"))) + (with-directory-excursion "doc" + (system* "make" "html") + (mkdir-p html) + (copy-recursively "build/html" html)) + (copy-file "LICENSE" (string-append doc "/LICENSE")) + #t)))))) (home-page "http://cffi.readthedocs.org") (synopsis "Foreign function interface for Python") (description |