From 26268a273b779f180ef950931bf56e7be6adb8621c55afa49298f07780e47cad Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 5 Jul 2017 11:38:40 +0000 Subject: [PATCH] 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 --- python-wsgi_intercept.changes | 5 +++++ python-wsgi_intercept.spec | 28 ++++++++++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/python-wsgi_intercept.changes b/python-wsgi_intercept.changes index a665b09..bbc35e8 100644 --- a/python-wsgi_intercept.changes +++ b/python-wsgi_intercept.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jul 5 08:34:43 UTC 2017 - tbechtold@suse.com + +- convert to singlespec + ------------------------------------------------------------------- Tue May 16 12:41:43 UTC 2017 - dmueller@suse.com diff --git a/python-wsgi_intercept.spec b/python-wsgi_intercept.spec index ad021b9..a3c8d81 100644 --- a/python-wsgi_intercept.spec +++ b/python-wsgi_intercept.spec @@ -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