Accepting request 1287171 from home:dgarcia:branches:devel:languages:python:numeric
- Drop upstream patch plotly-pr4622-np2.patch - Remove jupyter sub-package, not part of the package anymore after the switch to anywidget gh#plotly/plotly.py#4823 - Remove notebook from jupyter package, as part of jupyter notebook 6 drop, gh#plotly/plotly.py#4822 - Update to 6.1.2 (CVE-2025-5889, bsc#1244347) * Fix type checking and code highlighting for graph_objects classes [#5199] - Release 6.1.1 * Prevent swallowing of ValueError when creating a figure with subplots [#3888] * Fix issue causing fig.write_image() to not generate an image [#5193] - Release 6.1.0 ## Updated * Add support for Kaleido>=v1.0.0 for image generation [#5062, #5177] * Reduce package bundle size by 18-24% via changes to code generation [#4978] ## Fixed * Fix third-party widget display issues in v6 [#5102] * Add handling for case where jupyterlab or notebook is not installed [#5104] * Fix issue causing Plotly.js script to be embedded multiple times in Jupyter notebooks [#5112] * Re-add MIME renderer JupyterLab extension with JupyterLab 4 support to reduce file sizes for offline notebooks [#5096] * Fix issue preventing plots from rendering in HTML notebook export when using 'vscode+notebook' renderer [#5154] - Release 6.0.1 ## Updated * Updated Plotly.js from version 3.0.0 to version 3.0.1. See the OBS-URL: https://build.opensuse.org/request/show/1287171 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-plotly?expand=0&rev=75
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-plotly
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,8 +16,9 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without libalternatives
|
||||
Name: python-plotly
|
||||
Version: 5.24.1
|
||||
Version: 6.1.2
|
||||
Release: 0
|
||||
Summary: Library for collaborative, interactive, publication-quality graphs
|
||||
License: MIT
|
||||
@@ -31,22 +32,20 @@ Source10: package-lock.json
|
||||
Source11: node_modules.spec.inc
|
||||
%include %{_sourcedir}/node_modules.spec.inc
|
||||
Source100: python-plotly-rpmlintrc
|
||||
# PATCH-FIX-UPSTREAM plotly-pr4622-np2.patch gh#plotly/plotly.py#4622
|
||||
Patch0: plotly-pr4622-np2.patch
|
||||
BuildRequires: %{python_module base >= 3.6}
|
||||
BuildRequires: %{python_module jupyterlab >= 3}
|
||||
BuildRequires: %{python_module notebook >= 5.3}
|
||||
BuildRequires: %{python_module packaging}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module tenacity >= 6.2.0}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: alts
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: jupyter-rpm-macros
|
||||
BuildRequires: local-npm-registry
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: alts
|
||||
Requires: python-narwhals
|
||||
Requires: python-packaging
|
||||
Requires: python-tenacity >= 6.2.0
|
||||
Recommends: python-ipython
|
||||
Recommends: python-matplotlib >= 2.2.2
|
||||
Recommends: python-numpy
|
||||
@@ -59,8 +58,10 @@ BuildRequires: %{python_module ipykernel}
|
||||
BuildRequires: %{python_module ipython}
|
||||
BuildRequires: %{python_module ipywidgets}
|
||||
BuildRequires: %{python_module matplotlib}
|
||||
BuildRequires: %{python_module narwhals}
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module pandas}
|
||||
BuildRequires: %{python_module pdfrw}
|
||||
BuildRequires: %{python_module psutil}
|
||||
BuildRequires: %{python_module pyshp}
|
||||
BuildRequires: %{python_module pytest}
|
||||
@@ -82,29 +83,8 @@ Python API allows you to access all of Plotly's functionality from Python.
|
||||
Plotly figures are shared, tracked, and edited all online and the data is
|
||||
always accessible from the graph.
|
||||
|
||||
%package jupyter
|
||||
Summary: Jupyter notebook integration for %{name}
|
||||
Requires: %{name} = %{version}
|
||||
Requires: jupyter-plotly = %{version}
|
||||
# So that any of the flavor satisifies the jupyter package
|
||||
Provides: jupyterpython(plotly-jupyter) = %{version}
|
||||
Requires: python-ipywidgets >= 7.6
|
||||
Requires: (python-jupyterlab >= 3 or python-notebook >= 5.3)
|
||||
Provides: python-jupyterlab-plotly = %{version}-%{release}
|
||||
|
||||
%description jupyter
|
||||
Use this package to make collaborative, interactive,
|
||||
publication-quality graphs from Python on https://plot.ly.
|
||||
|
||||
Plotly is an online collaborative data analysis and graphing tool. The
|
||||
Python API allows you to access all of Plotly's functionality from Python.
|
||||
Plotly figures are shared, tracked, and edited all online and the data is
|
||||
always accessible from the graph.
|
||||
|
||||
This package provides Jupyterlab and Notebook integration and widgets.
|
||||
|
||||
%package -n jupyter-plotly
|
||||
Summary: Jupyter notebook integration for %{name}
|
||||
Summary: Jupyter integration for %{name}
|
||||
Requires: jupyterpython(plotly-jupyter) = %{version}
|
||||
Provides: jupyterlab-plotly = %{version}-%{release}
|
||||
|
||||
@@ -118,14 +98,12 @@ Plotly figures are shared, tracked, and edited all online and the data is
|
||||
always accessible from the graph.
|
||||
|
||||
This package provides the flavorless configuration for the
|
||||
Jupyterlab and Notebook integration and widgets.
|
||||
Jupyterlab integration and widgets.
|
||||
|
||||
%prep
|
||||
%autosetup -p4 -n plotly.py-%{version}/packages/python/plotly
|
||||
pushd ../../javascript/jupyterlab-plotly/
|
||||
%autosetup -p4 -n plotly.py-%{version}
|
||||
pushd js
|
||||
rm package-lock.json
|
||||
# allow builder v4
|
||||
sed -i '/jupyterlab.builder/ s/\^3/>=3/' package.json
|
||||
local-npm-registry %{_sourcedir} install --include=dev --include=peer
|
||||
popd
|
||||
# remove script interpreter line in non-executable script
|
||||
@@ -140,11 +118,12 @@ find . -name __init__.py -exec touch -m -r plotly/__init__.py '{}' ';'
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%fdupes %{buildroot}%{_jupyter_prefix}
|
||||
%python_clone -a %{buildroot}%{_bindir}/plotly_get_chrome
|
||||
|
||||
%check
|
||||
# API parameter mismatch
|
||||
donttest="test_described_subscript_error_on_type_error"
|
||||
%pytest plotly/tests/test_core -k "not ($donttest)"
|
||||
%pytest tests/test_core -k "not ($donttest)"
|
||||
# not available
|
||||
donttest="test_kaleido"
|
||||
donttest="$donttest or test_px_input and (vaex or polars)"
|
||||
@@ -156,23 +135,21 @@ donttest="$donttest or test_masked_constants_example"
|
||||
donttest="$donttest or test_fast_track_finite_arrays"
|
||||
# no python313-scikit-image yet
|
||||
python313_donttest=" or TestTernarycontour"
|
||||
%pytest plotly/tests/test_optional -k "not ($donttest ${$python_donttest})"
|
||||
|
||||
# Optional dependencies not yet in openSUSE, requires python-polars
|
||||
# --ignore doesn't work because the import is in the conftest.py
|
||||
rm -rf tests/test_optional/test_px/
|
||||
%pytest tests/test_optional -k "not ($donttest ${$python_donttest})"
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE.txt
|
||||
%{python_sitelib}/_plotly_future_/
|
||||
%{python_sitelib}/_plotly_utils/
|
||||
%{python_sitelib}/plotly/
|
||||
%{python_sitelib}/plotly-%{version}.dist-info
|
||||
|
||||
%files %{python_files jupyter}
|
||||
%license LICENSE.txt
|
||||
%{python_sitelib}/jupyterlab_plotly
|
||||
%python_alternative %{_bindir}/plotly_get_chrome
|
||||
|
||||
%files -n jupyter-plotly
|
||||
%license LICENSE.txt
|
||||
%{_jupyter_nbextension_dir}/jupyterlab-plotly/
|
||||
%{_jupyter_labextensions_dir3}/jupyterlab-plotly/
|
||||
%{_jupyter_config} %{_jupyter_nb_notebook_confdir}/jupyterlab-plotly.json
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user