diff --git a/pytest-doctestplus-1.5.0.tar.gz b/pytest-doctestplus-1.5.0.tar.gz deleted file mode 100644 index 28a5ca0d9792ba78520a6ec9378eb396d7fa329c..0000000000000000000000000000000000000000 Binary files a/pytest-doctestplus-1.5.0.tar.gz and /dev/null differ diff --git a/pytest-doctestplus-1.6.0.tar.gz b/pytest-doctestplus-1.6.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/python-pytest-doctestplus.spec b/python-pytest-doctestplus.spec index 5f8f2e5afb32bb4445fe5da74f7180f9a6318e45..6a1bfc870e54bb866192fbbd5cf2026a829f39ad 100644 --- a/python-pytest-doctestplus.spec +++ b/python-pytest-doctestplus.spec @@ -1,6 +1,7 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-pytest-doctestplus -Version: 1.5.0 +Version: 1.6.0 Release: 1 Summary: Pytest plugin with advanced doctest features. License: BSD-3-Clause @@ -16,14 +17,19 @@ Requires: python3-numpy Requires: python3-pytest-remotedata Requires: python3-sphinx +BuildRequires: python3-pip +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools + %description %{summary} %package -n python3-pytest-doctestplus Summary: Pytest plugin with advanced doctest features. Provides: python-pytest-doctestplus = %{version}-%{release} -BuildRequires: python3-devel -BuildRequires: python3-setuptools %description -n python3-pytest-doctestplus %{summary} @@ -38,11 +44,29 @@ Provides: python3-pytest-doctestplus-doc %prep %autosetup -n pytest-doctestplus-%{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 -%py3_build +export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}" +%pyproject_build %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 install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi @@ -76,6 +100,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 1.6.0-1 +- Update package to version 1.6.0 + * Mon Nov 3 2025 Hann - 1.5.0-1 - Update package to version 1.5.0 -Adding the usage of the doctest_encoding ini option when overwriting files with the doctest-plus-generate-diff option