diff --git a/filelock-3.18.0.tar.gz b/filelock-3.18.0.tar.gz deleted file mode 100644 index 7de3e8328d6309a59c4dc93e43dbf93a720185a0..0000000000000000000000000000000000000000 Binary files a/filelock-3.18.0.tar.gz and /dev/null differ diff --git a/filelock-3.20.0.tar.gz b/filelock-3.20.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..69f8a18a88b8d5de2ff0b3fbf05a0c77927c2ebc Binary files /dev/null and b/filelock-3.20.0.tar.gz differ diff --git a/python-filelock.spec b/python-filelock.spec index e2344818894f805eca5dcc26ecb167d62b192e68..7387fdb9ebbefe0030930b4d741f6b2b3550503c 100644 --- a/python-filelock.spec +++ b/python-filelock.spec @@ -1,30 +1,38 @@ +%global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-filelock -Version: 3.18.0 +Version: 3.20.0 Release: 1 Summary: A platform independent file lock License: Unlicense URL: https://github.com/benediktschmitt/py-filelock -Source0: %{pypi_source filelock} +Source0: https://files.pythonhosted.org/packages/source/f/filelock/filelock-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-pip python3-hatchling python3-hatch-vcs python3-wheel python3-pytest BuildRequires: python3-pytest-mock python3-pytest-virtualenv python3-virtualenv +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-sphinx +BuildRequires: python3-devel python3-setuptools + %description This package contains a single module, which implements a platform independent file locking mechanism for Python. %package doc Summary: Documentation for filelock, A platform independent file lock -BuildRequires: python3-sphinx %description doc Documentation for filelock, A platform independent file lock %package -n python3-filelock Summary: A platform independent file lock -BuildRequires: python3-devel python3-setuptools %{?python_provide:%python_provide python3-filelock} Suggests: %{name}-doc @@ -37,10 +45,28 @@ independent file locking mechanism for Python. %prep %autosetup -p1 -n filelock-%{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 %check @@ -62,6 +88,9 @@ pytest %doc README.md %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 3.20.0-1 +- Update package to version 3.20.0 + * Wed Jun 04 2025 zhoulinshen - 3.18.0-1 - Update package to version 3.18.0