diff --git a/nbformat-5.10.3.tar.gz b/nbformat-5.10.3.tar.gz deleted file mode 100644 index 37f6d1e5567fc829521d8897010e0d483e56f07a..0000000000000000000000000000000000000000 Binary files a/nbformat-5.10.3.tar.gz and /dev/null differ diff --git a/nbformat-5.10.4.tar.gz b/nbformat-5.10.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..53fb75f45a497255256ec924fd9476a3ca0154e8 Binary files /dev/null and b/nbformat-5.10.4.tar.gz differ diff --git a/python-nbformat.spec b/python-nbformat.spec index 35e38176e69d34a3946446db2f6912dfa4bc8ba1..4c319ad536b5dcb740409a360f1d43a38d3b0f7d 100644 --- a/python-nbformat.spec +++ b/python-nbformat.spec @@ -4,16 +4,17 @@ %global pypi_name nbformat %global common_description %{expand: +%undefine _python_dist_allow_version_zero This package contains the base implementation of the Jupyter Notebook format, and Python APIs for working with notebooks.} Name: python-%{pypi_name} -Version: 5.10.3 +Version: 5.10.4 Release: 1 Summary: The Jupyter Notebook format. License: BSD-3-Clause URL: https://github.com/jupyter/nbformat -Source0: %{pypi_source %{pypi_name}} +Source0: https://files.pythonhosted.org/packages/source/n/nbformat/nbformat-%{version}.tar.gz BuildArch: noarch @@ -35,6 +36,8 @@ BuildRequires: python3-pre-commit BuildRequires: python3-pep440 %endif +BuildRequires: python3-build + %description %{common_description} @@ -53,10 +56,28 @@ Documentation for %{name} %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 + %build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" %pyproject_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 %if %{with tests} @@ -76,6 +97,9 @@ Documentation for %{name} %license LICENSE %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 5.10.4-1 +- Update package to version 5.10.4 + * Tue Aug 12 2025 dongqi - 5.10.3-1 - Update package to version 5.10.3 * Restore usage of npm token