diff --git a/gabbi-4.0.0.tar.gz b/gabbi-4.1.1.tar.gz similarity index 36% rename from gabbi-4.0.0.tar.gz rename to gabbi-4.1.1.tar.gz index 5d53a02d3babfb882c22991bf8842e699bd3769e..d10b2b27618bf8b370f822d554b4d6be32c239f0 100644 Binary files a/gabbi-4.0.0.tar.gz and b/gabbi-4.1.1.tar.gz differ diff --git a/python-gabbi.spec b/python-gabbi.spec index ee63506c52e44d51a3cf469a5d6c5f2d006a0204..5ab2d13f7378e2d229ae17218c1fe6731db117e6 100644 --- a/python-gabbi.spec +++ b/python-gabbi.spec @@ -1,13 +1,22 @@ %global _empty_manifest_terminate_build 0 +%undefine _python_dist_allow_version_zero Name: python-gabbi -Version: 4.0.0 +Version: 4.1.1 Release: 1 Summary: Declarative HTTP testing library License: Apache-2.0 URL: https://github.com/cdent/gabbi -Source0: %{pypi_source gabbi} +Source0: https://files.pythonhosted.org/packages/source/g/gabbi/gabbi-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-wheel +BuildRequires: python3-build +BuildRequires: python3-hatchling +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-pbr + %description Gabbi is a tool for running HTTP tests where requests and responses are represented in a declarative YAML-based form. @@ -15,10 +24,6 @@ are represented in a declarative YAML-based form. %package -n python3-gabbi Summary: Declarative HTTP testing library Provides: python-gabbi = %{version}-%{release} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pip -BuildRequires: python3-pbr Requires: python3-pbr Requires: python3-pytest Requires: python3-six @@ -42,11 +47,29 @@ are represented in a declarative YAML-based form. %prep %autosetup -n gabbi-%{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 @@ -80,6 +103,9 @@ mv %{buildroot}/doclist.lst . %{_docdir}/* %changelog +* Thu Nov 27 2025 zhangzeyang0718 - 4.1.1-1 +- Update package to version 4.1.1 + * Wed Aug 20 2025 yaoxin <1024769339@qq.com> - 4.0.0-1 - Update to 4.0.0: * Use httpx.WSGITransport for wsgi app interception