From ab93c7df180b116332c1723edca2628aaeb80d2603b98223f60a27ef3771babe Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 16 Oct 2024 23:01:46 +0000 Subject: [PATCH] - Add patch support-python-313.patch: * Add legacy-cgi to install_requires to support Python 3.13. - Switch to autosetup macro. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebOb?expand=0&rev=74 --- python-WebOb.changes | 7 +++++++ python-WebOb.spec | 8 +++++++- support-python-313.patch | 23 +++++++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 support-python-313.patch diff --git a/python-WebOb.changes b/python-WebOb.changes index d9a752c..7affff2 100644 --- a/python-WebOb.changes +++ b/python-WebOb.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Oct 16 22:59:06 UTC 2024 - Steve Kowalik + +- Add patch support-python-313.patch: + * Add legacy-cgi to install_requires to support Python 3.13. +- Switch to autosetup macro. + ------------------------------------------------------------------- Mon Aug 19 03:28:33 UTC 2024 - Steve Kowalik diff --git a/python-WebOb.spec b/python-WebOb.spec index 035de84..f446b28 100644 --- a/python-WebOb.spec +++ b/python-WebOb.spec @@ -24,6 +24,9 @@ Summary: WSGI request and response object License: MIT URL: http://webob.org/ Source: https://files.pythonhosted.org/packages/source/w/webob/webob-%{version}.tar.gz +# PATCH-FIX-UPSTREAM gh#Pylons/webob#469 +Patch0: support-python-313.patch +BuildRequires: %{python_module legacy-cgi if %python-base >= 3.13} BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} @@ -32,6 +35,9 @@ BuildRequires: python-rpm-macros # Documentation requirements: BuildRequires: fdupes BuildRequires: python3-Sphinx +%if %{python_version_nodots} >= 313 +Requires: python-legacy-cgi +%endif BuildArch: noarch %python_subpackages @@ -53,7 +59,7 @@ This package contains documentation files for %{name}. %endif %prep -%setup -q -n webob-%{version} +%autosetup -p1 -n webob-%{version} %build %pyproject_wheel diff --git a/support-python-313.patch b/support-python-313.patch new file mode 100644 index 0000000..7ab07f1 --- /dev/null +++ b/support-python-313.patch @@ -0,0 +1,23 @@ +From 8b2fc22103ac1b8082752717a3a8a632eb1f4326 Mon Sep 17 00:00:00 2001 +From: Theron Luhn +Date: Thu, 10 Oct 2024 14:23:32 -0700 +Subject: [PATCH] Add `legacy-cgi` dependency for Python 3.13+ + +--- + setup.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/setup.py b/setup.py +index 7e8695a7..dbb00157 100644 +--- a/setup.py ++++ b/setup.py +@@ -52,6 +52,9 @@ + packages=find_packages('src', exclude=['tests']), + package_dir={'': 'src'}, + python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*', ++ install_requires=[ ++ "legacy-cgi>=2.6; python_version>='3.13'", ++ ], + zip_safe=True, + extras_require={ + 'testing': testing_extras,