Accepting request 1045226 from home:bnavigator:branches:devel:languages:python:numeric

- Update to version 5.11.0
  * Add clustering options to scattermapbox [#5827], with thanks to
    @elben10 for the contribution!
  * Add bounds to mapbox suplots [6339]
  * Add angle, angleref and standoff to marker and add backoff to
    line; also introduce new arrow symbols to facilitate drawing
    networks [#6297]
  * Add minreducedwidth and minreducedheight to layout for
    increasing control over automargin [#6307]
  * Add entrywidth and entrywidthmode to legend [#6202, #6324]
- Add patches for compatibility with numpy 1.24
  * plotly-fix-sources-np1.24.patch
  * plotly-fix-tests-np1.24.patch

OBS-URL: https://build.opensuse.org/request/show/1045226
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-plotly?expand=0&rev=51
This commit is contained in:
2022-12-24 16:22:24 +00:00
committed by Git OBS Bridge
parent 16c210b58d
commit 426df792f2
8 changed files with 183 additions and 23 deletions

View File

@@ -16,10 +16,9 @@
#
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
Name: python-plotly
Version: 5.10.0
Version: 5.11.0
Release: 0
Summary: Library for collaborative, interactive, publication-quality graphs
License: MIT
@@ -29,13 +28,19 @@ Source: https://files.pythonhosted.org/packages/source/p/plotly/plotly-%
# Additionally use the GitHub archive for the test suite
Source1: https://github.com/plotly/plotly.py/archive/refs/tags/v%{version}.tar.gz#/plotly.py-%{version}-gh.tar.gz
Source100: python-plotly-rpmlintrc
# PATCH-FIX-UPSTREAM plotly-fix-tests-np1.24.patch and plotly-fix-sources-np1.24.patch gh#plotly/plotly.py#3997
Patch1: plotly-fix-sources-np1.24.patch
Patch2: plotly-fix-tests-np1.24.patch
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module jupyterlab >= 3}
BuildRequires: %{python_module notebook >= 5.3}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.15.0}
BuildRequires: %{python_module tenacity >= 6.2.0}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: jupyter-rpm-macros
BuildRequires: python-rpm-macros
Requires: python-six >= 1.15.0
Requires: python-tenacity >= 6.2.0
Recommends: python-ipython
Recommends: python-matplotlib >= 2.2.2
@@ -45,8 +50,6 @@ Recommends: python-scipy
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Pillow}
# Currently not building in TW
#BuildRequires: %%{python_module Shapely}
BuildRequires: %{python_module ipykernel}
BuildRequires: %{python_module ipython}
BuildRequires: %{python_module ipywidgets}
@@ -80,7 +83,7 @@ Summary: Jupyter notebook integration for %{name}
Requires: %{name} = %{version}
Requires: jupyter-plotly = %{version}
Requires: python-ipywidgets >= 7.6
Requires: (python-jupyterlab or python-notebook)
Requires: (python-jupyterlab >= 3 or python-notebook >= 5.3)
Provides: python-jupyterlab-plotly = %{version}-%{release}
%description jupyter
@@ -113,38 +116,45 @@ Jupyterlab and Notebook integration and widgets.
%prep
%setup -q -n plotly-%{version} -b 1
%patch1 -p4
# remove script interpreter line in non-executable script
sed -i '1{/env python/ d}' _plotly_utils/png.py
# homogenize mtime of all __init__.py files for deduplicated compile cache consistency
find . -name __init__.py -exec touch -m -r plotly/__init__.py '{}' ';'
# patch the sources and tests in the github archive too
pushd ../plotly.py-%{version}
%patch1 -p1
%patch2 -p1
popd
%build
%python_build
%pyproject_wheel
%install
%python_install
%jupyter_move_config
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%fdupes %{buildroot}%{_jupyter_prefix}
%check
# No test suite in the PyPI package, which is required for the bundled JS files, go to the GitHub repo tree now.
cd ../plotly.py-%{version}/packages/python/plotly
%{pytest plotly/tests/test_core}
# most of the optional packages are not available on python36: skip entire test suite
python36_skip="-V"
# No test suite in the PyPI package, which is required for the bundled JS files, we are using the GitHub repo tree now.
# Important: make sure you patched the sources the same as the github repo
pushd ../plotly.py-%{version}/packages/python/plotly
%pytest plotly/tests/test_core
# not available
donttest="test_kaleido"
# API parameter mismatches and precision errors
donttest+=" or test_matplotlylib"
%pytest ${$python_skip} plotly/tests/test_optional -k "not ($donttest)"
# flaky timing error
donttest+=" or test_fast_track_finite_arrays"
%pytest plotly/tests/test_optional -k "not ($donttest)"
popd
%files %{python_files}
%license LICENSE.txt
%{python_sitelib}/_plotly_future_/
%{python_sitelib}/_plotly_utils/
%{python_sitelib}/plotly/
%{python_sitelib}/plotly-%{version}-py*.egg-info
%{python_sitelib}/plotly-%{version}.dist-info
%files %{python_files jupyter}
%license LICENSE.txt
@@ -152,6 +162,8 @@ donttest+=" or test_matplotlylib"
%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