Accepting request 1085581 from home:bnavigator:branches:devel:languages:python:r

- Fix missing runtime requirements
- Remove runtime requirement of typing stubs

OBS-URL: https://build.opensuse.org/request/show/1085581
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-responses?expand=0&rev=53
This commit is contained in:
Dirk Mueller 2023-05-09 06:41:28 +00:00 committed by Git OBS Bridge
parent 7366500061
commit 43e3d361bc
2 changed files with 27 additions and 17 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon May 8 21:00:43 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Fix missing runtime requirements
- Remove runtime requirement of typing stubs
-------------------------------------------------------------------
Fri May 5 18:05:59 UTC 2023 - Matej Cepl <mcepl@suse.com>

View File

@ -16,7 +16,6 @@
#
%global skip_python2 1
%{?sle15_python_module_pythons}
Name: python-responses
Version: 0.23.1
@ -26,27 +25,31 @@ License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/getsentry/responses
Source: https://files.pythonhosted.org/packages/source/r/responses/responses-%{version}.tar.gz
# PATCH-FIX-UPSTREAM unbundle-urllib3.patch bsc#[0-9]+ mcepl@suse.com
# PATCH-FIX-UPSTREAM unbundle-urllib3.patch gh#getsentry/responses#635, mcepl@suse.com
# Don't use urllib3 bundled in requests.
Patch0: unbundle-urllib3.patch
# PATCH-{FIX|FEATURE}-{OPENSUSE|SLE|UPSTREAM} name-of-file.patch bsc#[0-9]+ mcepl@suse.com
# this patch makes things totally awesome
Patch1: compat-urllib3-2.patch
# test requirements
BuildRequires: %{python_module cookies}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-httpserver}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.0}
BuildRequires: %{python_module tomli-w}
BuildRequires: %{python_module urllib3 >= 2.0}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-requests >= 2.0
Suggests: python-pytest
# SECTION test requirements
BuildRequires: %{python_module cookies}
BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest-httpserver}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.22 with %python-requests < 3}
BuildRequires: %{python_module tomli-w}
BuildRequires: %{python_module urllib3 >= 2}
# /SECTION
Requires: python-PyYAML
Requires: python-urllib3 >= 2
Requires: (python-requests >= 2.22.0 with python-requests < 3)
%if %{python_version_nodots} < 38
Requires: python-typing_extensions
%endif
BuildArch: noarch
%python_subpackages
@ -58,6 +61,8 @@ about the library.
%prep
%setup -q -n responses-%{version}
%autopatch -p1
# Remove typing stub requirements
sed -i /types-/d setup.py
%build
export LANG="en_US.UTF8"
@ -73,8 +78,7 @@ export PYTHONIOENCODING="utf_8"
%check
# gh#getsentry/responses#635
skiptests="test_auto_calculate_content_length_doesnt_override_existing_value"
%pytest -k "not ($skiptests ${$python_skiptests})"
%pytest -k "not ($skiptests)"
%files %{python_files}
%doc CHANGES README.rst