gnu: python-bokeh: Fix build.

* gnu/packages/python-xyz.scm (python-bokeh)[build-system]: Use
pyproject-build-system.
[arguments]: Use #:test-flags instead of a custom 'check phase; disable one
more test.
[native-inputs]: Add python-setuptools and python-wheel.

Change-Id: I2aaa56ed578490de38685b10430535a819c2f5c5
This commit is contained in:
Ricardo Wurmus 2024-12-15 22:26:24 +01:00 committed by Janneke Nieuwenhuizen
parent dbe249db1f
commit 98c62e1fb8
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -20059,65 +20059,69 @@ (define-public python-bokeh
(sha256 (sha256
(base32 (base32
"00sbhya9vfdv3yi07j6mxwx1x1h9497nhd3smdjrcdxgc48q0czg")))) "00sbhya9vfdv3yi07j6mxwx1x1h9497nhd3smdjrcdxgc48q0czg"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:test-flags
(replace 'check '(list
(lambda* (#:key tests? #:allow-other-keys) ;; These require selenium.
(when tests? "--ignore=tests/unit/bokeh/io/test_export.py"
;; These require selenium. "--ignore=tests/unit/bokeh/io/test_webdriver.py"
(delete-file "tests/unit/bokeh/io/test_export.py") "--ignore=tests/unit/bokeh/embed/test_standalone.py"
(delete-file "tests/unit/bokeh/io/test_webdriver.py")
(delete-file "tests/unit/bokeh/embed/test_standalone.py")
;; Doesn't find ManagedServerLoop fixture ;; Doesn't find ManagedServerLoop fixture
(delete-file "tests/unit/bokeh/test_client_server.py") "--ignore=tests/unit/bokeh/test_client_server.py"
;; This fails because of the Guix wrapper around pytest ;; This fails because of the Guix wrapper around pytest
(delete-file "tests/unit/bokeh/io/test_util__io.py") "--ignore=tests/unit/bokeh/io/test_util__io.py"
;; Fixture ipython not found. ;; Fixture ipython not found.
(delete-file "tests/unit/bokeh/application/handlers/test_notebook__handlers.py") "--ignore=tests/unit/bokeh/application/handlers/test_notebook__handlers.py"
(delete-file "tests/unit/bokeh/command/subcommands/test_info.py") "--ignore=tests/unit/bokeh/command/subcommands/test_info.py"
;; pd fixture not found. ;; pd fixture not found.
(delete-file "tests/unit/bokeh/models/test_mappers.py") "--ignore=tests/unit/bokeh/models/test_mappers.py"
(delete-file "tests/unit/bokeh/models/util/test_structure.py") "--ignore=tests/unit/bokeh/models/util/test_structure.py"
(delete-file "tests/unit/bokeh/plotting/test__plot.py") "--ignore=tests/unit/bokeh/plotting/test__plot.py"
(delete-file "tests/unit/bokeh/plotting/test__graph.py") "--ignore=tests/unit/bokeh/plotting/test__graph.py"
(delete-file "tests/unit/bokeh/plotting/test_figure.py") "--ignore=tests/unit/bokeh/plotting/test_figure.py"
(delete-file "tests/unit/bokeh/core/test_json_encoder.py") "--ignore=tests/unit/bokeh/core/test_json_encoder.py"
(delete-file "tests/unit/bokeh/core/property/test_bases.py") "--ignore=tests/unit/bokeh/core/property/test_bases.py"
(delete-file "tests/unit/bokeh/core/property/test_container.py") "--ignore=tests/unit/bokeh/core/property/test_container.py"
(delete-file "tests/unit/bokeh/core/property/test_dataspec.py") "--ignore=tests/unit/bokeh/core/property/test_dataspec.py"
(delete-file "tests/unit/bokeh/core/property/test_datetime.py") "--ignore=tests/unit/bokeh/core/property/test_datetime.py"
(delete-file "tests/unit/bokeh/core/property/test_pandas.py") "--ignore=tests/unit/bokeh/core/property/test_pandas.py"
;; nx fixture not found. ;; nx fixture not found.
(delete-file "tests/unit/bokeh/plotting/test_graph.py") "--ignore=tests/unit/bokeh/plotting/test_graph.py"
(delete-file "tests/unit/bokeh/models/test_graphs.py") "--ignore=tests/unit/bokeh/models/test_graphs.py"
(delete-file "tests/unit/bokeh/io/test_showing.py") "--ignore=tests/unit/bokeh/io/test_showing.py"
(delete-file "tests/unit/bokeh/document/test_events__document.py") "--ignore=tests/unit/bokeh/document/test_events__document.py"
;; These tests need external sample data ;; These tests need external sample data
(delete-file-recursively "tests/unit/bokeh/sampledata/") "--ignore-glob=tests/unit/bokeh/sampledata/*"
;; Attempts to install something via npm. ;; Attempts to install something via npm.
(delete-file "tests/unit/bokeh/test_ext.py") "--ignore=tests/unit/bokeh/test_ext.py"
;; More failures due to set up problems. ;; More failures due to set up problems.
(delete-file "tests/unit/bokeh/server/test_server__server.py") "--ignore=tests/unit/bokeh/server/test_server__server.py"
(delete-file "tests/unit/bokeh/server/test_tornado__server.py") "--ignore=tests/unit/bokeh/server/test_tornado__server.py"
(delete-file "tests/unit/bokeh/util/test_serialization.py") "--ignore=tests/unit/bokeh/util/test_serialization.py"
(delete-file "tests/unit/bokeh/util/test_hex.py") "--ignore=tests/unit/bokeh/util/test_hex.py"
(delete-file "tests/unit/bokeh/models/test_sources.py") "--ignore=tests/unit/bokeh/models/test_sources.py"
(delete-file "tests/unit/bokeh/embed/test_bundle.py") "--ignore=tests/unit/bokeh/embed/test_bundle.py"
;; XXX: This one test transforms a gif of a red box. It "-k"
;; transforms it all right but the base64 doesn't look as (string-append
;; expected, probably because of a change in pillow. ;; Fails with: 'called_once_with' is not a valid assertion. [...]
(invoke "pytest" "-v" "-k" "not test_transform_PIL"))))))) ;; Did you mean: 'assert_called_once_with'?
"not test_set_from_json"
;; XXX: This one test transforms a gif of a red box. It transforms
;; it all right but the base64 doesn't look as expected, probably
;; because of a change in pillow.
" and not test_transform_PIL"))))
(propagated-inputs (propagated-inputs
(list node-lts (list node-lts
python-jinja2 python-jinja2
@ -20136,7 +20140,9 @@ (define-public python-bokeh
python-pandas python-pandas
python-pytest python-pytest
python-pytz python-pytz
python-requests)) python-requests
python-setuptools
python-wheel))
(home-page "https://github.com/bokeh/bokeh") (home-page "https://github.com/bokeh/bokeh")
(synopsis "Interactive plots and applications in the browser from Python") (synopsis "Interactive plots and applications in the browser from Python")
(description (description