diff --git a/cachetools-6.2.1.tar.gz b/cachetools-6.2.1.tar.gz deleted file mode 100644 index 091bdbb943375d1208c6c22775a3c97c753092a0..0000000000000000000000000000000000000000 Binary files a/cachetools-6.2.1.tar.gz and /dev/null differ diff --git a/cachetools-6.2.2.tar.gz b/cachetools-6.2.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7ee5cc7c93fa70a2e92b6494df1e1a0c0ed33c0f Binary files /dev/null and b/cachetools-6.2.2.tar.gz differ diff --git a/python-cachetools.spec b/python-cachetools.spec index 5cf2ba3e9cc9d4c20afa488fd56dcb0151941500..b9a5fc4933b6250a50fb71068cd546c3130fe478 100644 --- a/python-cachetools.spec +++ b/python-cachetools.spec @@ -1,12 +1,22 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-cachetools -Version: 6.2.1 +Version: 6.2.2 Release: 1 Summary: Extensible memoizing collections and decorators License: MIT URL: https://github.com/tkem/cachetools/ -Source0: %{pypi_source cachetools} +Source0: https://files.pythonhosted.org/packages/source/c/cachetools/cachetools-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-build +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-pytest +BuildRequires: pyproject-rpm-macros + %description This module provides various memoizing collections and decorators, including variants of the Python Standard Library's `@lru_cache`_ @@ -16,13 +26,6 @@ function decorator. Summary: Extensible memoizing collections and decorators Provides: python-cachetools # Base build requires -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr -BuildRequires: python3-pip -BuildRequires: python3-wheel -BuildRequires: python3-pytest -BuildRequires: pyproject-rpm-macros %description -n python3-cachetools This module provides various memoizing collections and decorators, including variants of the Python Standard Library's `@lru_cache`_ @@ -39,10 +42,28 @@ function decorator. %prep %autosetup -n cachetools-%{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_wheel %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}" %pyproject3_install %pyproject_save_files -l cachetools @@ -53,6 +74,9 @@ function decorator. %doc CHANGELOG.rst README.rst %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 6.2.2-1 +- Update package to version 6.2.2 + * Tue Nov 4 2025 Hann - 6.2.1-1 - Update package to version 6.2.1 - Add support for Python 3.14