OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-ipympl?expand=0&rev=38
140 lines
4.9 KiB
RPMSpec
140 lines
4.9 KiB
RPMSpec
#
|
|
# spec file for package python-ipympl
|
|
#
|
|
# 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
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define pyver 0.9.7
|
|
%define jsver 0.11.7
|
|
%bcond_with test
|
|
Name: python-ipympl
|
|
Version: %{pyver}
|
|
Release: 0
|
|
Summary: Matplotlib Jupyter Extension
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/matplotlib/ipympl
|
|
Source0: https://files.pythonhosted.org/packages/source/i/ipympl/ipympl-%{pyver}.tar.gz
|
|
# package-lock.json file generated with command:
|
|
# npm install --package-lock-only --legacy-peer-deps --ignore-scripts
|
|
Source2: package-lock.json
|
|
# node_modules generated using "osc service mr" with the https://github.com/openSUSE/obs-service-node_modules
|
|
Source3: node_modules.spec.inc
|
|
%include %{_sourcedir}/node_modules.spec.inc
|
|
Source99: python-ipympl.rpmlintrc
|
|
BuildRequires: %{python_module Pillow}
|
|
BuildRequires: %{python_module hatch-jupyter-builder >= 0.8.3}
|
|
BuildRequires: %{python_module hatch-nodejs-version >= 0.3.2}
|
|
BuildRequires: %{python_module hatchling}
|
|
BuildRequires: %{python_module ipython < 10}
|
|
BuildRequires: %{python_module ipywidgets >= 7.6.0 with %python-ipywidgets < 9}
|
|
BuildRequires: %{python_module jupyterlab >= 4}
|
|
BuildRequires: %{python_module matplotlib >= 3.5.0 with %python-matplotlib < 4}
|
|
BuildRequires: %{python_module matplotlib-web}
|
|
BuildRequires: %{python_module nbval}
|
|
BuildRequires: %{python_module numpy}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module traitlets < 6}
|
|
BuildRequires: fdupes
|
|
BuildRequires: jupyter-rpm-macros
|
|
BuildRequires: local-npm-registry
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: unzip
|
|
Requires: jupyter-matplotlib = %{jsver}
|
|
Requires: python-Pillow
|
|
Requires: python-ipython < 10
|
|
Requires: python-matplotlib-web
|
|
Requires: python-numpy
|
|
Requires: python-traitlets < 6
|
|
Requires: (python-ipywidgets >= 7.6.0 with python-ipywidgets < 9)
|
|
Requires: (python-matplotlib >= 3.5.0 with python-matplotlib < 4)
|
|
Suggests: python-jupyterlab
|
|
Suggests: python-notebook
|
|
Provides: python-jupyter_ipympl = %{pyver}
|
|
Obsoletes: python-jupyter_ipympl < %{pyver}
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Jupyter extension to display matplotlib plots in a widget.
|
|
|
|
This package provides the python interface.
|
|
|
|
%package -n jupyter-matplotlib
|
|
Version: %{jsver}
|
|
Summary: Matplotlib Jupyter Extension
|
|
Group: Development/Languages/Python
|
|
Requires: jupyter-notebook
|
|
# Any flavor is okay, but suggest the primary one for automatic zypper choice -- boo#1214354
|
|
Requires: python3dist(ipympl) = %{pyver}
|
|
Suggests: python3-ipympl
|
|
Provides: jupyter-ipympl = %{jsver}
|
|
Obsoletes: jupyter-ipympl < %{jsver}
|
|
|
|
%description -n jupyter-matplotlib
|
|
Jupyter extension to display matplotlib plots in a widget.
|
|
|
|
This package provides the jupyter notebook extension.
|
|
|
|
%package -n jupyter-matplotlib-jupyterlab
|
|
Version: %{jsver}
|
|
Release: 0
|
|
Summary: Matplotlib JupyterLab Extension
|
|
Group: Development/Languages/Python
|
|
Requires: jupyter-jupyterlab
|
|
# Any flavor is okay, but suggest the primary one for automatic zypper choice -- boo#1214354
|
|
Requires: python3dist(ipympl) = %{pyver}
|
|
Suggests: python3-ipympl
|
|
Provides: jupyter-ipympl-jupyterlab = %{jsver}
|
|
Obsoletes: jupyter-ipympl-jupyterlab < %{jsver}
|
|
|
|
%description -n jupyter-matplotlib-jupyterlab
|
|
Jupyter extension to display matplotlib plots in a widget.
|
|
|
|
This package provides the JupyterLab extension.
|
|
|
|
%prep
|
|
%autosetup -p1 -n ipympl-%{pyver}
|
|
sed -i '/prepublish/d' package.json
|
|
local-npm-registry %{_sourcedir} install --include=dev --include=peer
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%jupyter_move_config
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
%fdupes %{buildroot}%{_jupyter_prefix}
|
|
|
|
%check
|
|
%pytest --nbval docs/examples/full-example.ipynb
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%{python_sitelib}/ipympl/
|
|
%{python_sitelib}/ipympl-%{pyver}.dist-info
|
|
|
|
%files -n jupyter-matplotlib
|
|
%license LICENSE
|
|
%{_jupyter_nbextension_dir}/jupyter-matplotlib
|
|
%{_jupyter_config} %{_jupyter_nb_notebook_confdir}/jupyter-matplotlib.json
|
|
|
|
%files -n jupyter-matplotlib-jupyterlab
|
|
%license LICENSE
|
|
%{_jupyter_labextensions_dir3}/jupyter-matplotlib
|
|
|
|
%changelog
|