File python-pybitbucket_fork.spec of Package python-pybitbucket_fork

#
# spec file for package python-pybitbucket_fork
#
# 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
# 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/


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_with test
Name:           python-pybitbucket_fork
Version:        0.12.2
Release:        0
License:        Apache-2.0
Summary:        Fork of a Python wrapper for the Bitbucket API
Url:            https://github.com/guyzmo/pybitbucket
Group:          Development/Languages/Python
Source:         https://files.pythonhosted.org/packages/source/p/pybitbucket_fork/pybitbucket_fork-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
%ifpython2
BuildRequires:  python2-enum34
%endif
%if %{with test}
BuildRequires:  %{python_module future}
BuildRequires:  %{python_module oauthlib}
BuildRequires:  %{python_module requests}
BuildRequires:  %{python_module requests_oauthlib}
BuildRequires:  %{python_module simplejson}
BuildRequires:  %{python_module six}
BuildRequires:  %{python_module uritemplate}
BuildRequires:  %{python_module voluptuous}
%endif
# SECTION test requirements
%if %{with test}
BuildRequires:  %{python_module flake8}
BuildRequires:  %{python_module httpretty}
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pytest}
%endif
# /SECTION
BuildRequires:  fdupes
Requires:       python-enum34
Requires:       python-future
Requires:       python-requests
Requires:       python-simplejson
Requires:       python-six
Requires:       python-uritemplate
Requires:       python-voluptuous
BuildArch:      noarch

%{python_subpackages}

%description
A Python wrapper for the Bitbucket Cloud REST API.
This is not known to work with Bitbucket Server,
previously known as Stash.

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

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec setup.py test
%endif

%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%python3_only %{_bindir}/pybitbucket_cli
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by