mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
gnu: python-scanpy: Use pyproject-build-system.
* gnu/packages/bioinformatics.scm (python-scanpy)[build-system]: Use pyproject-build-system. [arguments]: Remove custom 'build and 'install phases; move pytest arguments to #:test-flags; add 'pretend-version phase; replace custom 'check phase with 'delete-bad-tests phase.
This commit is contained in:
@@ -12802,32 +12802,35 @@ implementation differs in these ways:
|
|||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0k524xnx3dvpz5yx65p316wghvi01zs17is8w2m3w2qywiswk0sl"))))
|
"0k524xnx3dvpz5yx65p316wghvi01zs17is8w2m3w2qywiswk0sl"))))
|
||||||
(build-system python-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
(list
|
||||||
(modify-phases %standard-phases
|
#:test-flags
|
||||||
(replace 'build
|
'(list "-k"
|
||||||
(lambda _
|
;; Plot tests that fail.
|
||||||
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
|
(string-append "not test_dotplot_matrixplot_stacked_violin"
|
||||||
;; ZIP does not support timestamps before 1980.
|
" and not test_violin_without_raw"
|
||||||
(setenv "SOURCE_DATE_EPOCH" "315532800")
|
" and not test_correlation"
|
||||||
(invoke "flit" "build")))
|
" and not test_scatterplots"
|
||||||
(replace 'install
|
" and not test_scatter_embedding_add_outline_vmin_vmax_norm"
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
" and not test_paga"
|
||||||
(add-installed-pythonpath inputs outputs)
|
" and not test_paga_compare"
|
||||||
(let ((out (assoc-ref outputs "out")))
|
" and not test_clustermap"
|
||||||
(for-each (lambda (wheel)
|
|
||||||
(format #true wheel)
|
;; These try to connect to the network
|
||||||
(invoke "python" "-m" "pip" "install"
|
" and not test_scrublet_plots"
|
||||||
wheel (string-append "--prefix=" out)))
|
" and not test_plot_rank_genes_groups_gene_symbols"
|
||||||
(find-files "dist" "\\.whl$")))))
|
" and not test_pca_n_pcs"
|
||||||
;; Numba needs a writable dir to cache functions.
|
" and not test_pca_chunked"
|
||||||
(add-before 'check 'set-numba-cache-dir
|
" and not test_pca_sparse"
|
||||||
(lambda _
|
" and not test_pca_reproducible"))
|
||||||
(setenv "NUMBA_CACHE_DIR" "/tmp")))
|
#:phases
|
||||||
(replace 'check
|
#~(modify-phases %standard-phases
|
||||||
(lambda* (#:key tests? inputs #:allow-other-keys)
|
(add-after 'unpack 'pretend-version
|
||||||
(when tests?
|
(lambda _
|
||||||
|
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
|
||||||
|
(add-after 'unpack 'delete-bad-tests
|
||||||
|
(lambda _
|
||||||
;; These tests require Internet access.
|
;; These tests require Internet access.
|
||||||
(delete-file-recursively "scanpy/tests/notebooks")
|
(delete-file-recursively "scanpy/tests/notebooks")
|
||||||
(delete-file "scanpy/tests/test_clustering.py")
|
(delete-file "scanpy/tests/test_clustering.py")
|
||||||
@@ -12854,27 +12857,11 @@ implementation differs in these ways:
|
|||||||
|
|
||||||
(setenv "PYTHONPATH"
|
(setenv "PYTHONPATH"
|
||||||
(string-append (getcwd) ":"
|
(string-append (getcwd) ":"
|
||||||
(assoc-ref inputs "python-anndata:source") ":"
|
#$(this-package-native-input "python-anndata:source") ":"
|
||||||
(getenv "GUIX_PYTHONPATH")))
|
(getenv "GUIX_PYTHONPATH")))))
|
||||||
(invoke "pytest" "-vv"
|
;; Numba needs a writable dir to cache functions.
|
||||||
"-k"
|
(add-before 'check 'set-numba-cache-dir
|
||||||
;; Plot tests that fail.
|
(lambda _ (setenv "NUMBA_CACHE_DIR" "/tmp"))))))
|
||||||
(string-append "not test_dotplot_matrixplot_stacked_violin"
|
|
||||||
" and not test_violin_without_raw"
|
|
||||||
" and not test_correlation"
|
|
||||||
" and not test_scatterplots"
|
|
||||||
" and not test_scatter_embedding_add_outline_vmin_vmax_norm"
|
|
||||||
" and not test_paga"
|
|
||||||
" and not test_paga_compare"
|
|
||||||
" and not test_clustermap"
|
|
||||||
|
|
||||||
;; These try to connect to the network
|
|
||||||
" and not test_scrublet_plots"
|
|
||||||
" and not test_plot_rank_genes_groups_gene_symbols"
|
|
||||||
" and not test_pca_n_pcs"
|
|
||||||
" and not test_pca_chunked"
|
|
||||||
" and not test_pca_sparse"
|
|
||||||
" and not test_pca_reproducible"))))))))
|
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-anndata
|
(list python-anndata
|
||||||
python-dask
|
python-dask
|
||||||
|
|||||||
Reference in New Issue
Block a user