File python-pytest-localserver.spec of Package python-pytest-localserver

#
# spec file for package python-pytest-localserver
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2014 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/


Name:           python-pytest-localserver
Version:        0.3.3
Release:        0
License:        MIT
Summary:        py.test plugin to test server connections locally
Url:            http://bitbucket.org/basti/pytest-localserver/
Group:          Development/Languages/Python
Source:         https://pypi.python.org/packages/source/p/pytest-localserver/pytest-localserver-%{version}.tar.gz
BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  python-werkzeug
Requires:       python-werkzeug
BuildRequires:  python-pyOpenSSL
Requires:       python-pyOpenSSL
Requires:       python-pytest
# testing doesn't work as of now..
#BuildRequires:	python-pytest
#BuildRequires:	python-requests
#BuildRequires:	python-six
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

%description
pytest-localserver is a plugin for the `pytest`_ testing framework which enables
you to test server connections locally.

Sometimes `monkeypatching`_ ``urllib2.urlopen()`` just does not cut it, for
instance if you work with ``urllib2.Request``, define your own openers/handlers
or work with ``httplib``. In these cases it may come in handy to have an HTTP
server running locally which behaves just like the real thing. Well, look
no further!

%prep
%setup -q -n pytest-localserver-%{version}
rm -f pytest_localserver/server.pem.orig

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

#%%check
#python setup.py test

%files
%defattr(-,root,root,-)
%doc README LICENSE
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by