diff --git a/-2.0.1.tar.gz b/-2.0.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/2.0.0.tar.gz b/2.0.0.tar.gz deleted file mode 100644 index ffdf29c22da4ce2fd69e0dd1b94953592f350af8..0000000000000000000000000000000000000000 Binary files a/2.0.0.tar.gz and /dev/null differ diff --git a/python-wrapt.spec b/python-wrapt.spec index d21679710a683fbb929135ab815b3393ec314e6e..866d3b16aee9574d5d991daed7490aceaad90ba6 100644 --- a/python-wrapt.spec +++ b/python-wrapt.spec @@ -1,11 +1,22 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-wrapt -Version: 2.0.0 +Version: 2.0.1 Release: 1 Summary: A Python module for decorators, wrappers and monkey patching License: BSD-2-Clause URL: https://github.com/GrahamDumpleton/wrapt -Source0: https://github.com/GrahamDumpleton/wrapt/archive/refs/tags/%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/-//-%{version}.tar.gz + +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-sphinx +BuildRequires: gcc +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel %description The aim of the wrapt module is to provide a transparent object proxy for Python, @@ -19,13 +30,6 @@ far more scenarios than typical decorators and provide more predictable and cons Summary: Module for decorators, wrappers and monkey patching. Provides: python-wrapt # Base build requires -BuildRequires: python3-sphinx -BuildRequires: gcc -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr -BuildRequires: python3-pip -BuildRequires: python3-wheel %description -n python3-wrapt Python3 module for wrapt module. @@ -43,23 +47,44 @@ far more scenarios than typical decorators and provide more predictable and cons %prep %autosetup -n wrapt-%{version} -p1 +# 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 -%py3_build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_build pushd docs sphinx-build -b html -d build/doctrees . build/html popd %install -%py3_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 %files -n python3-wrapt %doc RELEASE.rst LICENSE -%{python3_sitearch}/{wrapt,wrapt-%{version}-py*.egg-info} +%{python3_sitearch}/{wrapt,wrapt-%{version}-py*.dist-info/} %files help %doc docs/build/html %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 2.0.1-1 +- Update package to version 2.0.1 + * Wed Nov 12 2025 wuzhaomin - 2.0.0-1 - Upgrade version to 2.0.0 - Fix formatting of __all__ module list.