14
0

Accepting request 974834 from home:pgajdos:python

- version update to 3.4.0
  too many changes, see CHANGELOG.md in documantation or at
  https://github.com/python-gitlab/python-gitlab/blob/main/CHANGELOG.md
- python-mock is not required for build

OBS-URL: https://build.opensuse.org/request/show/974834
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-gitlab?expand=0&rev=22
This commit is contained in:
2022-05-04 09:28:28 +00:00
committed by Git OBS Bridge
parent 23b1f977e1
commit 0b705d2fc7
4 changed files with 21 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-python-gitlab
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-python-gitlab
Version: 2.5.0
Version: 3.4.0
Release: 0
Summary: Python module for interacting with the GitLab API
License: LGPL-3.0-only
@@ -32,19 +32,20 @@ BuildRequires: python-rpm-macros
Requires: python-PyYAML >= 5.2
Requires: python-argcomplete >= 1.10.0
Requires: python-requests >= 2.22.0
Requires: python-requests-toolbelt >= 0.9.1
Requires: python-setuptools
Requires: python-six
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module httmock}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.22.0}
BuildRequires: %{python_module requests-toolbelt >= 0.9.1}
BuildRequires: %{python_module responses}
BuildRequires: %{python_module six}
# /SECTION
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires(post): update-alternatives
Requires(postun):update-alternatives
%python_subpackages
%description
@@ -53,10 +54,9 @@ The python-gitlab package provides access to the GitLab server API.
It supports the v4 API of GitLab, and provides a CLI tool (gitlab).
%prep
%setup -q -n python-gitlab-%{version}
%autosetup -p1 -n python-gitlab-%{version}
# rpmlint non-executable-script
sed -i -e '/^#!\//, 1d' gitlab/cli.py
sed -i -e '/^#!\//, 1d' gitlab/tests/test_cli.py
sed -i -e '/^#!\//, 1d' gitlab/v4/cli.py
%build
@@ -69,12 +69,8 @@ sed -i -e '/^#!\//, 1d' gitlab/v4/cli.py
%check
touch $HOME/.python-gitlab.cfg
# The follow tests depend on a docker instance of gitlab
# - test_cli
# - test_list_project_packages
# - test_packages
# - test_variables
%pytest -k 'not (test_cli or test_list_project_packages or test_packages or test_variables)'
# test_merge_auth: E gitlab.config.GitlabIDError: Impossible to get the gitlab id (not specified in config file)
%pytest tests/unit -k 'not test_merge_auth'
%post
%python_install_alternative gitlab
@@ -83,7 +79,7 @@ touch $HOME/.python-gitlab.cfg
%python_uninstall_alternative gitlab
%files %{python_files}
%doc AUTHORS ChangeLog.rst README.rst
%doc AUTHORS CHANGELOG.md README.rst
%license COPYING
%python_alternative %{_bindir}/gitlab
%{python_sitelib}/*