15
0

Accepting request 493088 from home:TheBlackCat:branches:devel:languages:python

singlespec version of python-WebTest

OBS-URL: https://build.opensuse.org/request/show/493088
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-WebTest?expand=0&rev=34
This commit is contained in:
2017-05-15 11:57:46 +00:00
committed by Git OBS Bridge
parent 59d7a240c4
commit ee1e8930a3
4 changed files with 63 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-WebTest
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,46 +16,48 @@
#
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-WebTest
Version: 2.0.23
Version: 2.0.27
Release: 0
Url: http://webtest.pythonpaste.org/
Summary: Helper to test WSGI applications
License: MIT
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/W/WebTest/WebTest-%{version}.tar.gz
Source: https://files.pythonhosted.org/packages/source/W/WebTest/WebTest-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-PasteDeploy
BuildRequires: python-WSGIProxy2
BuildRequires: python-base
BuildRequires: python-beautifulsoup4
BuildRequires: python-cssselect
BuildRequires: python-mock
BuildRequires: python-pyquery
BuildRequires: python-setuptools
BuildRequires: python-six
BuildRequires: python-unittest2
BuildRequires: python-waitress
# Documentation build requirements:
BuildRequires: python-Sphinx
# Test build requirements:
BuildRequires: python-WebOb
BuildRequires: python-coverage
BuildRequires: python-nose
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module PasteDeploy}
BuildRequires: %{python_module WebOb >= 1.2}
BuildRequires: %{python_module WSGIProxy2}
BuildRequires: %{python_module beautifulsoup4}
BuildRequires: %{python_module cssselect}
BuildRequires: %{python_module pyquery}
BuildRequires: %{python_module waitress >= 0.8.5}
%if %{with tests}
BuildRequires: %{python_module coverage}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module nose}
BuildRequires: python-unittest2
%endif
# Documentation build requirements:
BuildRequires: python3-Sphinx
Requires: python-WebOb >= 1.2
Requires: python-beautifulsoup4
Requires: python-six
Requires: python-waitress >= 0.8.5
Provides: python-webtest = %{version}
Obsoletes: python-webtest < %{version}
%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
%ifpython2
Obsoletes: %{oldpython}-webtest < %{version}
Provides: %{oldpython}-webtest = %{version}
%endif
BuildArch: noarch
%python_subpackages
%description
This wraps any WSGI application and makes it easy to send test
@@ -64,12 +66,12 @@ requests to that application, without starting up an HTTP server.
This provides convenient full-stack testing of applications written
with any WSGI-compatible framework.
%package doc
%package -n %{name}-doc
Summary: Helper to test WSGI applications - Documentation
Group: Documentation/HTML
Requires: %{name} = %{version}
Provides: %{python_module WebTest-doc = %{version}}
%description doc
%description -n %{name}-doc
This package contains documentation files for %{name}.
%prep
@@ -78,23 +80,24 @@ This package contains documentation files for %{name}.
sed -i 's/nose<1\.3\.0/nose/' setup.py
%build
python setup.py build
python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%python_build
python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if 0%{?suse_version} > 1110
%if %{with tests}
%check
python setup.py -q test
%python_exec setup.py -q test
%endif
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst docs/license.rst
%{python_sitelib}/*
%files doc
%files -n %{name}-doc
%defattr(-,root,root,-)
%doc build/sphinx/html