Archived
1
0
Fork 0

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.
This commit is contained in:
Marius Bakke 2017-07-01 21:48:06 +02:00
parent 92d7e87c59
commit 295f32f34b
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -4781,19 +4781,31 @@ a front-end for C compilers or analysis tools.")
("python-sphinx" ,python-sphinx) ("python-sphinx" ,python-sphinx)
("python-pytest" ,python-pytest))) ("python-pytest" ,python-pytest)))
(arguments (arguments
`(#:phases `(#:modules ((ice-9 ftw)
(alist-cons-after (srfi srfi-26)
'install 'install-doc (guix build utils)
(lambda* (#:key outputs #:allow-other-keys) (guix build python-build-system))
(let* ((data (string-append (assoc-ref outputs "doc") "/share")) #:phases
(doc (string-append data "/doc/" ,name "-" ,version)) (modify-phases %standard-phases
(html (string-append doc "/html"))) (replace 'check
(with-directory-excursion "doc" (lambda _
(system* "make" "html") (setenv "PYTHONPATH"
(mkdir-p html) (string-append
(copy-recursively "build/html" html)) (getenv "PYTHONPATH")
(copy-file "LICENSE" (string-append doc "/LICENSE")))) ":" (getcwd) "/build/"
%standard-phases))) (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") (home-page "http://cffi.readthedocs.org")
(synopsis "Foreign function interface for Python") (synopsis "Foreign function interface for Python")
(description (description