diff --git a/pytest_testmon-2.1.3.tar.gz b/pytest_testmon-2.1.3.tar.gz deleted file mode 100644 index 6eea03e3e5ed9c5fb1a424340c5cc2851ce3dd8f..0000000000000000000000000000000000000000 Binary files a/pytest_testmon-2.1.3.tar.gz and /dev/null differ diff --git a/pytest_testmon-2.1.4.tar.gz b/pytest_testmon-2.1.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..50fdaf94a4331b0de02b2e95c24b204de09ab8f0 Binary files /dev/null and b/pytest_testmon-2.1.4.tar.gz differ diff --git a/python-pytest-testmon.spec b/python-pytest-testmon.spec index 12a1b1f8432a912d3c81319f5bf5fd254f3649bb..7a6f61a62a7748d2c741ed5d66eca9a0990a2176 100644 --- a/python-pytest-testmon.spec +++ b/python-pytest-testmon.spec @@ -1,22 +1,28 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-pytest-testmon -Version: 2.1.3 +Version: 2.1.4 Release: 1 Summary: selects tests affected by changed files and methods License: MIT URL: https://github.com/tarpas/pytest-testmon -Source0: https://files.pythonhosted.org/packages/source/p/pytest-testmon/pytest_testmon-%{version}.tar.gz +Source0: https://files.pythonhosted.org/packages/source/p/pytest_testmon/pytest_testmon-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python-pip python-wheel +BuildRequires: python3-devel +BuildRequires: python3-setuptools + %description This is a pytest plug-in which automatically selects and re-executes only tests affected by recent changes. %package -n python3-pytest-testmon Summary: selects tests affected by changed files and methods Provides: python-pytest-testmon = %{version}-%{release} -BuildRequires: python-pip python-wheel -BuildRequires: python3-devel -BuildRequires: python3-setuptools Requires: python3-pytest Requires: python3-coverage %description -n python3-pytest-testmon @@ -31,10 +37,28 @@ This is a pytest plug-in which automatically selects and re-executes only tests %prep %autosetup -n pytest_testmon-%{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 install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi @@ -52,6 +76,9 @@ if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi %{_docdir}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 2.1.4-1 +- Update package to version 2.1.4 + * Tue Oct 21 2025 liyue - 2.1.3-1 - Update package to version 2.1.3 - fix PytestRemovedIn9Warning: The (path: py.path.local) argument is deprecated