2017-09-04 12:30:51 +02:00
|
|
|
#
|
2023-11-29 14:10:43 +01:00
|
|
|
# spec file
|
2017-09-04 12:30:51 +02:00
|
|
|
#
|
2024-01-20 13:28:11 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2017-09-04 12:30:51 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-11-01 19:00:07 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-09-04 12:30:51 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-11-07 11:13:11 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# too many flaky timeouts on obs servers
|
|
|
|
%bcond_with testexamples
|
|
|
|
|
|
|
|
Name: python-bokeh%{psuffix}
|
2024-01-20 13:28:11 +01:00
|
|
|
Version: 3.3.3
|
2017-09-04 12:30:51 +02:00
|
|
|
Release: 0
|
2018-04-13 12:49:39 +02:00
|
|
|
Summary: Statistical interactive HTML plots for Python
|
2017-09-04 12:30:51 +02:00
|
|
|
License: BSD-3-Clause
|
2022-11-07 11:13:11 +01:00
|
|
|
URL: https://bokeh.org/
|
|
|
|
# Source-URL: https://github.com/bokeh/bokeh/
|
|
|
|
# for the precompiled JS files
|
2021-09-23 13:26:04 +02:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/b/bokeh/bokeh-%{version}.tar.gz
|
2022-11-07 11:13:11 +01:00
|
|
|
# for the tests
|
|
|
|
Source1: https://github.com/bokeh/bokeh/archive/refs/tags/%{version}.tar.gz#/bokeh-%{version}-gh.tar.gz
|
|
|
|
# Sampledata: `rm -rf .bokeh && HOME=$PWD bokeh sampledata && tar cJf bokeh-sampledata.tar.xz .bokeh`
|
|
|
|
Source99: bokeh-sampledata.tar.xz
|
2021-07-13 11:13:08 +02:00
|
|
|
BuildRequires: %{python_module Jinja2 >= 2.9}
|
2021-02-21 23:53:46 +01:00
|
|
|
BuildRequires: %{python_module Pillow >= 7.1.0}
|
|
|
|
BuildRequires: %{python_module PyYAML >= 3.10}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
|
|
|
BuildRequires: %{python_module colorama}
|
|
|
|
BuildRequires: %{python_module contourpy >= 1}
|
2023-05-18 16:40:59 +02:00
|
|
|
BuildRequires: %{python_module numpy >= 1.16}
|
2021-02-21 23:53:46 +01:00
|
|
|
BuildRequires: %{python_module packaging >= 16.8}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module pandas >= 1.2}
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module setuptools-git-versioning}
|
2020-06-08 15:35:26 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2021-02-21 23:53:46 +01:00
|
|
|
BuildRequires: %{python_module tornado >= 5.1}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module wheel}
|
|
|
|
BuildRequires: %{python_module xyzservices >= 2021.9.1 }
|
2020-06-08 15:35:26 +02:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2021-07-13 11:13:08 +02:00
|
|
|
Requires: python-Jinja2 >= 2.9
|
2021-02-21 23:53:46 +01:00
|
|
|
Requires: python-Pillow >= 7.1.0
|
2018-11-01 19:00:07 +01:00
|
|
|
Requires: python-PyYAML >= 3.10
|
2022-11-07 11:13:11 +01:00
|
|
|
Requires: python-base >= 3.8
|
|
|
|
Requires: python-contourpy >= 1
|
2023-05-18 16:40:59 +02:00
|
|
|
Requires: python-numpy >= 1.16
|
2018-11-01 19:00:07 +01:00
|
|
|
Requires: python-packaging >= 16.8
|
2022-11-07 11:13:11 +01:00
|
|
|
Requires: python-pandas >= 1.2
|
2021-02-21 23:53:46 +01:00
|
|
|
Requires: python-tornado >= 5.1
|
2022-11-07 11:13:11 +01:00
|
|
|
Requires: python-xyzservices >= 2021.9.1
|
2018-11-01 19:00:07 +01:00
|
|
|
Requires(post): update-alternatives
|
2021-05-28 18:03:14 +02:00
|
|
|
Requires(postun):update-alternatives
|
2018-11-01 19:00:07 +01:00
|
|
|
BuildArch: noarch
|
2021-05-28 23:00:42 +02:00
|
|
|
# SECTION test requirements
|
2022-11-07 11:13:11 +01:00
|
|
|
%if %{with test}
|
2021-05-28 23:00:42 +02:00
|
|
|
BuildRequires: %{python_module beautifulsoup4}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module bokeh = %{version}}
|
|
|
|
BuildRequires: %{python_module colorcet}
|
2021-05-28 23:00:42 +02:00
|
|
|
BuildRequires: %{python_module flaky}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module icalendar}
|
2023-07-03 23:45:54 +02:00
|
|
|
BuildRequires: %{python_module ipython}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module json5}
|
|
|
|
BuildRequires: %{python_module nbconvert >= 5.4}
|
2021-06-05 14:56:09 +02:00
|
|
|
BuildRequires: %{python_module networkx}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module pandas-datareader}
|
|
|
|
BuildRequires: %{python_module pandas}
|
2021-09-23 13:26:04 +02:00
|
|
|
BuildRequires: %{python_module pydot}
|
2023-01-05 08:50:31 +01:00
|
|
|
BuildRequires: %{python_module pygraphviz}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module pyshp}
|
|
|
|
BuildRequires: %{python_module pytest-asyncio >= 0.18.1}
|
2023-07-03 23:45:54 +02:00
|
|
|
BuildRequires: %{python_module pytest-timeout}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
2021-05-28 23:00:42 +02:00
|
|
|
BuildRequires: %{python_module pytest}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module requests >= 1.2.3}
|
|
|
|
BuildRequires: %{python_module requests-unixsocket}
|
|
|
|
BuildRequires: %{python_module scikit-learn}
|
2021-05-28 23:00:42 +02:00
|
|
|
BuildRequires: %{python_module selenium}
|
2023-12-16 20:11:59 +01:00
|
|
|
BuildRequires: %{python_module toml}
|
2022-11-07 11:13:11 +01:00
|
|
|
BuildRequires: %{python_module tornado}
|
2023-05-18 16:04:18 +02:00
|
|
|
BuildRequires: npm
|
2021-05-28 23:00:42 +02:00
|
|
|
%endif
|
|
|
|
# /SECTION
|
2017-09-04 12:30:51 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2018-04-13 12:49:39 +02:00
|
|
|
Bokeh is a Python interactive visualization library that targets web
|
|
|
|
browsers for presentation. It provides concise construction of
|
|
|
|
graphics in the style of D3.js, and favors delivering this capability
|
|
|
|
with interactivity over large or streaming datasets.
|
2017-09-04 12:30:51 +02:00
|
|
|
|
|
|
|
%prep
|
2022-11-07 11:13:11 +01:00
|
|
|
%if !%{with test}
|
|
|
|
%setup -q -n bokeh-%{version}
|
|
|
|
%else
|
|
|
|
%setup -q -n bokeh-%{version} -T -b1 -a99
|
|
|
|
%endif
|
2017-09-04 12:30:51 +02:00
|
|
|
|
2022-11-07 11:13:11 +01:00
|
|
|
%if !%{with test}
|
2017-09-04 12:30:51 +02:00
|
|
|
%build
|
2022-11-07 11:13:11 +01:00
|
|
|
# Needs the JS files prepackaged in src/bokeh/server/static/, marked by PKG-INFO in sdist
|
|
|
|
%pyproject_wheel
|
2017-09-04 12:30:51 +02:00
|
|
|
|
|
|
|
%install
|
2022-11-07 11:13:11 +01:00
|
|
|
%pyproject_install
|
2017-09-04 12:30:51 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/bokeh
|
|
|
|
|
2023-12-16 20:11:59 +01:00
|
|
|
%python_expand find %{buildroot}%{$python_sitelib}/typings -name __init__.pyi -size 0 -delete
|
|
|
|
|
2022-11-07 11:13:11 +01:00
|
|
|
%endif
|
2017-09-04 12:30:51 +02:00
|
|
|
|
2022-11-07 11:13:11 +01:00
|
|
|
%if %{with test}
|
2017-09-04 12:30:51 +02:00
|
|
|
%check
|
2021-09-23 13:26:04 +02:00
|
|
|
# npm can't build inside obs without network
|
2022-11-07 11:13:11 +01:00
|
|
|
deselectname="test_bokehjs or test_ext_commands"
|
|
|
|
%if %{with testexamples}
|
|
|
|
# loads external font
|
|
|
|
deselectname+=" or (test_examples and font-awesome)"
|
|
|
|
# no squarify
|
|
|
|
deselectname+=" or (test_examples and treemap)"
|
|
|
|
%else
|
|
|
|
# too many flaky timeouts on obs servers
|
|
|
|
deselectname+=" or test_examples"
|
|
|
|
%endif
|
|
|
|
# testfile not available
|
2021-09-23 13:26:04 +02:00
|
|
|
deselectname+=" or test_with_INLINE_resources"
|
|
|
|
deselectname+=" or test_with_CDN_resources"
|
2023-07-03 23:45:54 +02:00
|
|
|
deselectname+=" or test_with_Server_resources"
|
|
|
|
deselectname+=" or test_with_Server_resources_dev"
|
|
|
|
deselectname+=" or test_cross"
|
2021-09-23 13:26:04 +02:00
|
|
|
# does not expect pytest-$binsuffix
|
|
|
|
deselectname+=" or test_detect_current_filename"
|
2022-11-07 11:13:11 +01:00
|
|
|
# cannot open socket / address already in use / no pattern detected
|
|
|
|
deselectname+=" or (test_server and test_address)"
|
|
|
|
deselectname+=" or (test_serve and printed)"
|
|
|
|
deselectname+=" or test__ioloop_not_forcibly_stopped"
|
|
|
|
# not json5 serializable
|
|
|
|
deselectname+=" or test_defaults"
|
|
|
|
# flaky timeouts
|
|
|
|
deselectname+=" or (test_deprecation and (test_since or test_message))"
|
2022-11-20 19:39:06 +01:00
|
|
|
deselectname+=" or (test_document_lifecycle and test_document_on_session_destroyed_exceptions)"
|
2022-11-07 11:13:11 +01:00
|
|
|
# test can't list modules correctly in test environment
|
|
|
|
deselectname+=" or (codebase and combined)"
|
|
|
|
# extraneous fields
|
|
|
|
deselectname+=" or test_serialization_data_models"
|
|
|
|
# linting and code structure irrelevant for rpm package
|
2023-01-05 08:50:31 +01:00
|
|
|
deselectname+=" or test_ruff or test_isort or test_eslint or test_code_quality or test_no_request_host"
|
2022-11-07 11:13:11 +01:00
|
|
|
# no driver (chromedriver only x86_64)
|
|
|
|
deselectname+=" or Test_webdriver_control"
|
|
|
|
# fails when tested with pytest-xdist
|
|
|
|
deselectname+=" or (TestModelCls and test_get_class)"
|
|
|
|
deselectname+=" or test_external_js_and_css_resource_ordering"
|
2023-12-16 20:11:59 +01:00
|
|
|
# No vermin pkg for openSUSE
|
|
|
|
deselectname+=" or test_vermin"
|
|
|
|
# network
|
|
|
|
deselectname+=" or test__use_provided_session_header_autoload"
|
2022-11-07 11:13:11 +01:00
|
|
|
# for finding the sampledata (packaged in Source99)
|
|
|
|
export HOME=$PWD
|
2023-07-03 23:45:54 +02:00
|
|
|
export PYTEST_DEBUG_TEMPROOT=$(mktemp -d -p ./)
|
2022-11-07 11:13:11 +01:00
|
|
|
%pytest -v -m "not selenium" -k "not ($deselectname)" --no-js -n auto
|
2017-09-04 12:30:51 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative bokeh
|
|
|
|
|
2021-09-23 11:53:59 +02:00
|
|
|
%postun
|
2017-09-04 12:30:51 +02:00
|
|
|
%python_uninstall_alternative bokeh
|
|
|
|
|
2022-11-07 11:13:11 +01:00
|
|
|
%if !%{with test}
|
2017-09-04 12:30:51 +02:00
|
|
|
%files %{python_files}
|
2018-07-06 10:40:09 +02:00
|
|
|
%license LICENSE.txt
|
2022-11-07 11:13:11 +01:00
|
|
|
%doc README.md
|
2017-09-04 12:30:51 +02:00
|
|
|
%python_alternative %{_bindir}/bokeh
|
|
|
|
%{python_sitelib}/bokeh/
|
2022-11-07 11:13:11 +01:00
|
|
|
%{python_sitelib}/bokeh-%{version}*-info
|
2023-12-16 20:11:59 +01:00
|
|
|
%{python_sitelib}/typings/
|
2022-11-07 11:13:11 +01:00
|
|
|
%endif
|
2017-09-04 12:30:51 +02:00
|
|
|
|
|
|
|
%changelog
|