File python-uamqp.spec of Package python-uamqp

#
# spec file for package python-uamqp
#
# Copyright (c) 2019 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-%{**} python3-%{**}}
Name:           python-uamqp
Version:        1.1.0
Release:        0
License:        MIT
Summary:        AMQP 10 Client Library for Python
Url:            https://github.com/Azure/azure-uamqp-python
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/u/uamqp/uamqp-%{version}.tar.gz
Patch1:         u_drop-compatible-releases-operator.patch
Patch2:         u_drop-extras-require.patch
Patch3:         u_strip-werror.patch
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
# SECTION test requirements
BuildRequires:  %{python_module certifi >= 2017.4.17}
BuildRequires:  %{python_module six >= 1.0}
# /SECTION
BuildRequires:  fdupes
BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  libopenssl-devel
Requires:       python-certifi >= 2017.4.17
Requires:       python-six >= 1.0
Suggests:       python-enum34 >= 1.0.4

%python_subpackages

%description
AMQP 1.0 Client Library for Python

%prep
%setup -q -n uamqp-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
export CFLAGS="%{optflags}"
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
#%%check
#%%python_exec setup.py test

%files %{python_files}
%doc README.rst
%{python_sitearch}/*

%changelog