summaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-07-01 21:48:06 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-07-04 02:52:25 +0200
commit295f32f34b45d4df6c06d241d0ac1572ff5ed4cc (patch)
tree1eb24d82fe216634f755a1efe4c3f3d915915293 /gnu/packages/python.scm
parent92d7e87c5922bac7746f201f2ccb028cc5e7aaee (diff)
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/packages/python.scm')
-rw-r--r--gnu/packages/python.scm38
1 files changed, 25 insertions, 13 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 3e71a23bcf6..a55cdafa259 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -4781,19 +4781,31 @@ a front-end for C compilers or analysis tools.")
4781 ("python-sphinx" ,python-sphinx) 4781 ("python-sphinx" ,python-sphinx)
4782 ("python-pytest" ,python-pytest))) 4782 ("python-pytest" ,python-pytest)))
4783 (arguments 4783 (arguments
4784 `(#:phases 4784 `(#:modules ((ice-9 ftw)
4785 (alist-cons-after 4785 (srfi srfi-26)
4786 'install 'install-doc 4786 (guix build utils)
4787 (lambda* (#:key outputs #:allow-other-keys) 4787 (guix build python-build-system))
4788 (let* ((data (string-append (assoc-ref outputs "doc") "/share")) 4788 #:phases
4789 (doc (string-append data "/doc/" ,name "-" ,version)) 4789 (modify-phases %standard-phases
4790 (html (string-append doc "/html"))) 4790 (replace 'check
4791 (with-directory-excursion "doc" 4791 (lambda _
4792 (system* "make" "html") 4792 (setenv "PYTHONPATH"
4793 (mkdir-p html) 4793 (string-append
4794 (copy-recursively "build/html" html)) 4794 (getenv "PYTHONPATH")
4795 (copy-file "LICENSE" (string-append doc "/LICENSE")))) 4795 ":" (getcwd) "/build/"
4796 %standard-phases))) 4796 (car (scandir "build" (cut string-prefix? "lib." <>)))))
4797 (zero? (system* "py.test" "-v"))))
4798 (add-after 'install 'install-doc
4799 (lambda* (#:key outputs #:allow-other-keys)
4800 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4801 (doc (string-append data "/doc/" ,name "-" ,version))
4802 (html (string-append doc "/html")))
4803 (with-directory-excursion "doc"
4804 (system* "make" "html")
4805 (mkdir-p html)
4806 (copy-recursively "build/html" html))
4807 (copy-file "LICENSE" (string-append doc "/LICENSE"))
4808 #t))))))
4797 (home-page "http://cffi.readthedocs.org") 4809 (home-page "http://cffi.readthedocs.org")
4798 (synopsis "Foreign function interface for Python") 4810 (synopsis "Foreign function interface for Python")
4799 (description 4811 (description