14
0

Accepting request 508268 from home:tbechtold:branches:devel:languages:python

- convert to singlespec

OBS-URL: https://build.opensuse.org/request/show/508268
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-wsgi_intercept?expand=0&rev=30
This commit is contained in:
2017-07-05 11:38:40 +00:00
committed by Git OBS Bridge
parent 901d939218
commit 26268a273b
2 changed files with 19 additions and 14 deletions

View File

@@ -16,6 +16,7 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-wsgi_intercept
Version: 1.5.0
Release: 0
@@ -26,22 +27,21 @@ Url: https://github.com/cdent/python3-wsgi-intercept
Source: https://pypi.io/packages/source/w/wsgi_intercept/wsgi_intercept-%{version}.tar.gz
# PATCH-FIX-OPENSUSE speilicke@suse.com -- Patching fails
Patch0: wsgi_intercept-disable-testbogusdomain.patch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# Test requirements:
BuildRequires: python-httplib2
BuildRequires: python-pytest >= 2.4
BuildRequires: python-requests >= 2.0.1
BuildRequires: python-six
BuildRequires: python-urllib3 >= 1.11.0
BuildRequires: %{python_module httplib2}
BuildRequires: %{python_module pytest >= 2.4}
BuildRequires: %{python_module requests >= 2.0.1}
BuildRequires: %{python_module six}
BuildRequires: %{python_module urllib3 >= 1.11.0}
Requires: python-six
Recommends: python-requests >= 2.0.1
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%python_subpackages
%description
Testing a WSGI application normally involves starting a server at a local host
@@ -57,17 +57,17 @@ can avoid spawning multiple processes or threads to test your Web app.
%endif
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
rm -rf %{buildroot}%{python_sitelib}/test
%check
# skip tests trying to access google.com
py.test -k "not not_intercepted" build/
%files
%files %{python_files}
%defattr(-,root,root,-)
%{python_sitelib}/wsgi_intercept-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/wsgi_intercept