From c69c7a386e6fcfd272c841d9d0ffd7a583faf8f2 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Jul 20 2020 15:19:40 +0000 Subject: Initial import (#1856313). --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..594c12e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/ipywidgets-7.5.1.tar.gz diff --git a/python-ipywidgets.spec b/python-ipywidgets.spec new file mode 100644 index 0000000..825abae --- /dev/null +++ b/python-ipywidgets.spec @@ -0,0 +1,80 @@ +# Created by pyp2rpm-3.3.4 +%global pypi_name ipywidgets +# Documentation is disabled because it requires jupyter-sphinx +%bcond_with doc + +Name: python-%{pypi_name} +Version: 7.5.1 +Release: 1%{?dist} +Summary: IPython HTML widgets for Jupyter + +License: BSD +URL: http://ipython.org +Source0: %{pypi_source} +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(ipython) +BuildRequires: python3dist(ipykernel) +# Docs +%if %{with doc} +BuildRequires: python3dist(nbsphinx) +BuildRequires: python3dist(recommonmark) +BuildRequires: python3dist(sphinx) +%endif +# Tests +BuildRequires: python3dist(jsonschema) +BuildRequires: python3dist(pytest) + +%description +Interactive HTML widgets for Jupyter notebooks and the IPython kernel. + +%package -n python3-%{pypi_name} +Summary: %{summary} + +%description -n python3-%{pypi_name} +Interactive HTML widgets for Jupyter notebooks and the IPython kernel. + +%if %{with doc} +%package -n python-%{pypi_name}-doc +Summary: ipywidgets documentation +%description -n python-%{pypi_name}-doc +Documentation for ipywidgets +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} +sed -i "s/from distutils.core /from setuptools /" setup.py + + +%build +%py3_build +%if %{with doc} +# generate html docs +PYTHONPATH=${PWD} sphinx-build-3 docs/source html +# remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} +%endif + +%install +%py3_install + +%check +%pytest + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%if %{with doc} +%files -n python-%{pypi_name}-doc +%doc html +%license LICENSE +%endif + +%changelog +* Mon Jul 13 2020 Lumír Balhar - 7.5.1-1 +- Initial package. diff --git a/sources b/sources new file mode 100644 index 0000000..1dfc194 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (ipywidgets-7.5.1.tar.gz) = 856b3e4dad331766eff6e5f1fd31984a4b6ede5c678ffd51a4896f6448dac53ba181ccec2821f10e07e0f1095318427affe19f1420d0337bc3d37ef1e0a9ea0d