c69c7a3
%global pypi_name ipywidgets
c69c7a3
c69c7a3
Name:           python-%{pypi_name}
3ad55c3
Version:        8.0.7
107206e
Release:        %autorelease
c69c7a3
Summary:        IPython HTML widgets for Jupyter
c69c7a3
3ad55c3
License:        BSD-3-Clause
c69c7a3
URL:            http://ipython.org
c69c7a3
Source0:        %{pypi_source}
3ad55c3
# Remove shebang lines from test_* files
3ad55c3
Patch:          https://github.com/jupyter-widgets/ipywidgets/pull/3807.patch
c69c7a3
BuildArch:      noarch
c69c7a3
c69c7a3
BuildRequires:  python3-devel
c69c7a3
c69c7a3
%description
c69c7a3
Interactive HTML widgets for Jupyter notebooks and the IPython kernel.
c69c7a3
c69c7a3
%package -n     python3-%{pypi_name}
c69c7a3
Summary:        %{summary}
c69c7a3
c69c7a3
%description -n python3-%{pypi_name}
c69c7a3
Interactive HTML widgets for Jupyter notebooks and the IPython kernel.
c69c7a3
c69c7a3
%prep
3ad55c3
%autosetup -p3 -n %{pypi_name}-%{version}
271eafe
# Jupyterlab_widgets is a new dependency in ipywidgets 7.6
271eafe
# and it contains code which enables widgets in Jupyter lab
271eafe
# not requiring any manual steps. But we don't have Jupyter lab
271eafe
# in Fedora yet so we do not need this package at all.
77de5e1
sed -i "/jupyterlab_widgets/d" setup.cfg
c69c7a3
77de5e1
%generate_buildrequires
77de5e1
%pyproject_buildrequires -x test
c69c7a3
c69c7a3
%build
77de5e1
%pyproject_wheel
c69c7a3
c69c7a3
%install
77de5e1
%pyproject_install
77de5e1
%pyproject_save_files %{pypi_name}
c69c7a3
c69c7a3
%check
77de5e1
%pytest
c69c7a3
77de5e1
%files -n python3-%{pypi_name} -f %{pyproject_files}
c69c7a3
%doc README.md
c69c7a3
c69c7a3
%changelog
107206e
%autochangelog