mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-15 03:15:09 -05:00
gnu: python-pandas: Build and run tests in parallel.
* gnu/packages/python-science.scm (python-pandas) [phases]{enable-parallel-build}: New phase. {check}: Add xdist -n option. Skip test_memory_usage test. [native-inputs]: Add python-pytest-xdist.
This commit is contained in:
parent
feee911366
commit
8b390a8750
1 changed files with 13 additions and 1 deletions
|
@ -413,6 +413,12 @@ (define-public python-pandas
|
|||
(srfi srfi-26))
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-after 'unpack 'enable-parallel-build
|
||||
(lambda _
|
||||
(substitute* "setup.py"
|
||||
(("\"-j\", type=int, default=1")
|
||||
(format #f "\"-j\", type=int, default=~a"
|
||||
(parallel-job-count))))))
|
||||
(add-after 'unpack 'patch-which
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let ((which (assoc-ref inputs "which")))
|
||||
|
@ -439,6 +445,7 @@ (define-public python-pandas
|
|||
(when tests?
|
||||
(invoke "pytest" "-vv" "pandas" "--skip-slow"
|
||||
"--skip-network"
|
||||
"-n" (number->string (parallel-job-count))
|
||||
"-k"
|
||||
(string-append
|
||||
;; These test access the internet (see:
|
||||
|
@ -448,7 +455,11 @@ (define-public python-pandas
|
|||
"not test_wrong_url"
|
||||
;; TODO: Missing input
|
||||
" and not TestS3"
|
||||
" and not s3"))))))))))
|
||||
" and not s3"
|
||||
;; This test fails when run with pytest-xdist
|
||||
;; (see:
|
||||
;; https://github.com/pandas-dev/pandas/issues/39096).
|
||||
" and not test_memory_usage"))))))))))
|
||||
(propagated-inputs
|
||||
(list python-jinja2
|
||||
python-numpy
|
||||
|
@ -466,6 +477,7 @@ (define-public python-pandas
|
|||
python-html5lib
|
||||
python-pytest
|
||||
python-pytest-mock
|
||||
python-pytest-xdist
|
||||
;; Needed to test clipboard support.
|
||||
xorg-server-for-tests))
|
||||
(home-page "https://pandas.pydata.org")
|
||||
|
|
Loading…
Reference in a new issue