150 lines
5 KiB
RPMSpec
150 lines
5 KiB
RPMSpec
# Wants to download sample data, also wants firefox or geckodriver etc.
|
|
# So, we skip tests and rely on upstream's CI
|
|
# Needs to be run with --enable-network
|
|
%bcond_with tests
|
|
|
|
%global _description %{expand:
|
|
Bokeh is an interactive visualization library for modern web browsers. It
|
|
provides elegant, concise construction of versatile graphics, and affords
|
|
high-performance interactivity over large or streaming data sets. Bokeh can help
|
|
anyone who would like to quickly and easily make interactive plots, dashboards,
|
|
and data applications.}
|
|
|
|
Name: python-bokeh
|
|
Version: 3.2.0
|
|
Release: %autorelease
|
|
Summary: Interactive plots and applications in the browser from Python
|
|
|
|
# License breakdown: licensecheck -r . | sed '/UNKNOWN/ d' | sort -t ':' -k 2
|
|
# The software is released under the BSD license, but includes files that are
|
|
# independently also marked with ASL 2.0 and MIT licenses
|
|
# The JS bits are npm based
|
|
|
|
# ASL:
|
|
# bokeh/palettes.py
|
|
# bokeh/server/static/lib/lib.*
|
|
|
|
# BSD:
|
|
# bokeh/server/static/js/bokeh-api.js
|
|
# bokeh/server/static/js/bokeh-api.legacy.js
|
|
# bokeh/server/static/js/bokeh-api.legacy.min.js
|
|
# bokeh/server/static/js/bokeh-api.min.js
|
|
# bokeh/server/static/js/bokeh.js
|
|
# bokeh/server/static/js/bokeh.legacy.js
|
|
# bokeh/server/static/js/bokeh.legacy.min.js
|
|
# bokeh/server/static/js/bokeh.min.js
|
|
# bokeh/server/static/js/bokeh-tables.js
|
|
# bokeh/server/static/js/bokeh-tables.legacy.js
|
|
# bokeh/server/static/js/bokeh-widgets.js
|
|
# bokeh/server/static/js/bokeh-widgets.legacy.js
|
|
# bokeh/server/static/js/bokeh-widgets.legacy.min.js
|
|
# bokeh/server/static/js/bokeh-widgets.min.js
|
|
# bokeh/server/static/js/compiler.js
|
|
# bokeh/server/static/js/compiler/prelude.js
|
|
# tests/unit/bokeh/test___init__.py
|
|
# bokeh/server/static/js/lib/api/palettes.js
|
|
# bokeh/server/static/js/types/api/palettes.d.ts
|
|
|
|
# MIT (Expat)
|
|
# bokeh/server/static/js/lib/core/util/array.js
|
|
# bokeh/server/static/js/lib/core/util/callback.js
|
|
# bokeh/server/static/js/lib/core/util/types.js
|
|
# bokeh/server/static/js/lib/core/util/wheel.js
|
|
# bokeh/server/static/js/types/core/util/wheel.d.ts
|
|
|
|
# Multiple licenses:
|
|
# bokeh/server/static/js/bokeh.json: Expat License Apache License 2.0
|
|
# bokeh/server/static/js/bokeh-tables.legacy.min.js: Expat License BSD 3-clause "New" or "Revised" License
|
|
# bokeh/server/static/js/bokeh-tables.min.js: Expat License BSD 3-clause "New" or "Revised" License
|
|
|
|
# Also see the breakdown in the bundled JS below
|
|
# and https://github.com/bokeh/bokeh/blob/branch-2.2/bokehjs/LICENSE
|
|
License: BSD and ASL 2.0 and MIT and ISC
|
|
URL: https://github.com/bokeh/bokeh
|
|
Source0: %{pypi_source bokeh}
|
|
|
|
BuildArch: noarch
|
|
|
|
%description %_description
|
|
|
|
%package -n python3-bokeh
|
|
Summary: %{summary}
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
|
|
# Optional deps
|
|
# https://docs.bokeh.org/en/latest/docs/installation.html#installation
|
|
Recommends: %{py3_dist jupyter-core}
|
|
Recommends: %{py3_dist networkx}
|
|
Recommends: %{py3_dist pandas}
|
|
Recommends: %{py3_dist psutil}
|
|
Recommends: %{py3_dist sphinx}
|
|
|
|
# Bokeh will look for whatever browser is available and use that, so not adding
|
|
# firefox etc to Recommends
|
|
# https://docs.bokeh.org/en/latest/docs/user_guide/export.html#userguide-export
|
|
|
|
%if %{with tests}
|
|
BuildRequires: %{py3_dist beautifulsoup4}
|
|
BuildRequires: %{py3_dist icalendar}
|
|
BuildRequires: %{py3_dist flaky}
|
|
BuildRequires: %{py3_dist Jinja2} >= 2.7
|
|
BuildRequires: %{py3_dist mock}
|
|
BuildRequires: %{py3_dist nbconvert}
|
|
BuildRequires: %{py3_dist networkx}
|
|
BuildRequires: %{py3_dist numpy} >= 1.11.3
|
|
BuildRequires: %{py3_dist packaging} >= 16.8
|
|
BuildRequires: %{py3_dist pillow} >= 7.1.0
|
|
BuildRequires: %{py3_dist pytest}
|
|
BuildRequires: %{py3_dist python-dateutil} >= 2.1
|
|
BuildRequires: %{py3_dist PyYAML} >= 3.10
|
|
BuildRequires: %{py3_dist requests}
|
|
BuildRequires: %{py3_dist selenium}
|
|
BuildRequires: %{py3_dist sphinx}
|
|
BuildRequires: %{py3_dist toml}
|
|
BuildRequires: %{py3_dist tornado} >= 5.1
|
|
BuildRequires: %{py3_dist typing_extensions} >= 3.7.4
|
|
%endif
|
|
|
|
|
|
%description -n python3-bokeh %_description
|
|
|
|
%prep
|
|
%autosetup -n bokeh-%{version}
|
|
|
|
%if %{with tests}
|
|
# pytest doesn't like it
|
|
sed -i 's/^timeout = 60//' pyproject.toml
|
|
%endif
|
|
|
|
%generate_buildrequires
|
|
%pyproject_buildrequires
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%pyproject_save_files bokeh
|
|
|
|
# Remove zero length file
|
|
rm -f %{buildroot}/%{python3_sitelib}/bokeh/server/static/.keep
|
|
|
|
%check
|
|
|
|
%if %{with tests}
|
|
# download sample data
|
|
PYTHONPATH="%{buildroot}/%{python3_sitelib}/" %{python3} -c 'import bokeh ; bokeh.sampledata.download();'
|
|
# run complete import check
|
|
%pyproject_check_import bokeh
|
|
# skip pytests: pypi doesn't include necessary code bits, but we can't use github tar because it doesn't include the necessary js etc.
|
|
%else
|
|
# skip tests that want to download things
|
|
%pyproject_check_import bokeh -e *airport_routes* -e *webdriver* -e *sampledata* -e *bokeh_autodoc* -e *sphinxext*
|
|
%endif
|
|
|
|
%files -n python3-bokeh -f %{pyproject_files}
|
|
%{_bindir}/bokeh
|
|
|
|
%changelog
|
|
%autochangelog
|