File python-autobahn.spec of Package python-autobahn

#
# spec file for package python-autobahn
#
# Copyright (c) 2018 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
# 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 https://bugs.opensuse.org/
#


%{?!python_module:%define python_module() python-%{**} %{!?skip_python3:python3-%{**}}}
%define skip_python2 1
Name:           python-autobahn
Version:        18.9.2
Release:        0
Summary:        WebSocket and WAMP in Python for Twisted and asyncio
License:        MIT
Group:          Development/Languages/Python
URL:            http://crossbar.io/autobahn
Source:         https://files.pythonhosted.org/packages/source/a/autobahn/autobahn-%{version}.tar.gz
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module pytest-asyncio}
%if "%{python_flavor}" == "python2"
BuildRequires:  python2-trollius
%endif
Requires:       python-Twisted
Requires:       python-six
Requires:       python-txaio
BuildArch:      noarch
# SECTION test requirements
BuildRequires:  %{python_module Twisted}
BuildRequires:  %{python_module six >= 1.10.0}
BuildRequires:  %{python_module txaio}
# /SECTION
%if "%{python_flavor}" == "python2"
Requires:       python-trollius
%endif
%python_subpackages

%description
WebSocket allows bidirectional real-time messaging on the Web and WAMP adds
asynchronous Remote Procedure Calls and Publish & Subscribe on top of WebSocket.

%prep
%setup -q -n autobahn-%{version}

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
export USE_ASYNCIO=true
%{python_expand PYTHONPATH=. $python -m pytest autobahn}

%files %{python_files}
%license LICENSE
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by