File python-PyGithub.spec of Package python-PyGithub

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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{!?license: %global license %doc}
%bcond_without test
Name:           python-PyGithub
Version:        1.35
Release:        0
Summary:        Use the full Github API v3
License:        LGPL-3.0
Group:          Development/Languages/Python
# PATCH-FIX-OPENSUSE -- Remove test that needs network access
Patch0:         PyGithub-drop-network-tests.patch
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
# SECTION test
BuildRequires:  %{python_module PyJWT}
Requires:       python-PyJWT
Recommends:     python-cryptography
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch


PyGithub is a Python (2 and 3) library to use the Github API v3. With it, you
can manage your Github resources (repositories, user profiles, organizations,
etc.) from Python scripts.

%setup -q -n PyGithub-%{version}


%{python_expand rm -r %{buildroot}%{$python_sitelib}/github/tests/}
%{python_expand %fdupes %{buildroot}%{$python_sitelib}}

%{python_exec test}

%files %{python_files}

openSUSE Build Service is sponsored by