mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
python-build-system: add a check phase.
* guix/build/python-build-system.scm (check): New procedure. (%standard-phases): Use it.
This commit is contained in:
parent
9b222abe03
commit
842ded334f
1 changed files with 13 additions and 3 deletions
|
@ -45,6 +45,14 @@ (define* (install #:key outputs (configure-flags '())
|
|||
(zero? (apply system* "python" args)))
|
||||
(error "no setup.py found"))))
|
||||
|
||||
(define* (check #:key outputs #:allow-other-keys)
|
||||
"Run the test suite of a given Python package."
|
||||
(if (file-exists? "setup.py")
|
||||
(let ((args `("setup.py" "check")))
|
||||
(format #t "running 'python' with arguments ~s~%" args)
|
||||
(zero? (apply system* "python" args)))
|
||||
(error "no setup.py found")))
|
||||
|
||||
(define* (wrap #:key outputs python-version #:allow-other-keys)
|
||||
(define (list-of-files dir)
|
||||
(map (cut string-append dir "/" <>)
|
||||
|
@ -78,10 +86,12 @@ (define %standard-phases
|
|||
(alist-cons-after
|
||||
'install 'wrap
|
||||
wrap
|
||||
(alist-replace 'install install
|
||||
(alist-delete 'configure
|
||||
(alist-replace
|
||||
'check check
|
||||
(alist-replace 'install install
|
||||
(alist-delete 'configure
|
||||
(alist-delete 'build
|
||||
gnu:%standard-phases)))))
|
||||
gnu:%standard-phases))))))
|
||||
|
||||
(define* (python-build #:key inputs (phases %standard-phases)
|
||||
#:allow-other-keys #:rest args)
|
||||
|
|
Loading…
Reference in a new issue