diff --git a/ipywidgets-8.1.7.tar.gz b/ipywidgets-8.1.7.tar.gz deleted file mode 100644 index 977e54781caefbf196abfd712695b6cc18c0167d..0000000000000000000000000000000000000000 Binary files a/ipywidgets-8.1.7.tar.gz and /dev/null differ diff --git a/ipywidgets-8.1.8.tar.gz b/ipywidgets-8.1.8.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..fee8c580775a4aa3b80d8ce54b0d7843076b1739 Binary files /dev/null and b/ipywidgets-8.1.8.tar.gz differ diff --git a/python-ipywidgets.spec b/python-ipywidgets.spec index f9da28cfa7ecd70c6f93c1fdfc36406872cab35d..1de634f8a828a6a6a6dee7958b7500c6ae0292a0 100644 --- a/python-ipywidgets.spec +++ b/python-ipywidgets.spec @@ -1,14 +1,15 @@ %global _empty_manifest_terminate_build 0 %global pypi_name ipywidgets +%undefine _python_dist_allow_version_zero Name: python-%{pypi_name} -Version: 8.1.7 +Version: 8.1.8 Release: 1 Summary: IPython HTML widgets for Jupyter License: BSD-3-Clause URL: https://github.com/jupyter-widgets/ipywidgets -Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/i/ipywidgets/ipywidgets-%{version}.tar.gz Source1: lab-info BuildArch: noarch @@ -30,6 +31,11 @@ BuildRequires: python3-ipykernel BuildRequires: python3-comm BuildRequires: python3-pytz +BuildRequires: python3-build +BuildRequires: python3-jupyter-packaging +BuildRequires: python3-tomlkit +BuildRequires: python3-deprecation + %description Interactive HTML widgets for Jupyter notebooks and the IPython kernel. @@ -41,25 +47,34 @@ Interactive HTML widgets for Jupyter notebooks and the IPython kernel. %package -n python3-widgetsnbextension Summary: Jupyter interactive widgets for Jupyter Notebook. -BuildRequires: python3-jupyter-packaging %description -n python3-widgetsnbextension This package makes Jupyter widgets available in the classic Jupyter Notebook. %package -n python3-jupyterlab-widgets Summary: Jupyter interactive widgets for JupyterLab. -BuildRequires: python3-tomlkit -BuildRequires: python3-deprecation %description -n python3-jupyterlab-widgets A JupyterLab 3.0 extension for Jupyter/IPython widgets. %prep %autosetup -p1 -n %{pypi_name}-%{version} + +# Fix setuptools_scm version issue +if [ -f pyproject.toml ]; then + sed -i '/^version *=/d' pyproject.toml + sed -i '/^\[project\]/a version = "%{version}"' pyproject.toml + sed -i '/dynamic *= *\[.*version.*\]/d' pyproject.toml + if grep -q '^\[tool\.setuptools_scm\]' pyproject.toml; then + sed -i '/^\[tool\.setuptools_scm\]/,/^\[/ {/^write_to *=/d}' pyproject.toml + sed -i '/^\[tool\.setuptools_scm\]/a fallback_version = "%{version}"' pyproject.toml + fi +fi tar xzvf %{SOURCE1} -C ./python/jupyterlab_widgets/ sed -i 's/\~=/\>=/g' python/ipywidgets/setup.cfg %build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" mkdir build cd %{_builddir}/ipywidgets-%{version}/python/widgetsnbextension %pyproject_build @@ -72,6 +87,12 @@ cd %{_builddir}/ipywidgets-%{version}/python/ipywidgets cp ./build/*.whl %{_builddir}/ipywidgets-%{version}/build/ %install +export PYTHONDONTWRITEBYTECODE=1 + +# Clean __pycache__ directories and .pyc/.pyo files +find %{buildroot} -name '*.py[co]' -delete +find %{buildroot} -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_install %check @@ -99,6 +120,9 @@ cd %{_builddir}/ipywidgets-%{version}/python/ipywidgets %{_datadir}/jupyter/labextensions/ %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 8.1.8-1 +- Update package to version 8.1.8 + * Fri May 23 2025 Dongxing Wang - 8.1.7-1 - Update package to version 8.1.7 Fix CI + remove Python 3.8