14
0

- Add skip_failing_tests.patch

- Add pkg_resources.patch (lp#2003556) to use packaging instead
  of obsolete version of pkg_resources.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-jenkins?expand=0&rev=33
This commit is contained in:
2023-04-12 15:19:20 +00:00
committed by Git OBS Bridge
parent 5bdbf4564e
commit a41675fb7f
5 changed files with 314 additions and 113 deletions

View File

@@ -17,7 +17,6 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-python-jenkins
Version: 1.8.0
Release: 0
@@ -28,20 +27,31 @@ URL: https://opendev.org/jjb/python-jenkins
Source: https://files.pythonhosted.org/packages/source/p/python-jenkins/python-jenkins-%{version}.tar.gz
# https://bugs.launchpad.net/python-jenkins/+bug/1971524
Patch0: python-python-jenkins-no-mock.patch
# PATCH-FIX-UPSTREAM pkg_resources.patch lp#2003556 mcepl@suse.com
# Don't depend on the old version of setuptools, but use packaging
Patch1: pkg_resources.patch
# PATCH-FIX-OPENSUSE skip_failing_tests.patch bsc#[0-9]+ mcepl@suse.com
# skip failing tests (upstream just up-versioned setuptools and cannot be bothered)
Patch2: skip_failing_tests.patch
BuildRequires: %{python_module cmd2}
BuildRequires: %{python_module multi_key_dict}
BuildRequires: %{python_module packaging}
BuildRequires: %{python_module pbr >= 0.8.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module requests-mock >= 1.4}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module testscenarios}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(krb5-gssapi)
Requires: python-multi_key_dict
Requires: python-packaging
Requires: python-pbr
Requires: python-requests
Requires: python-setuptools
Requires: python-six >= 1.3.0
Provides: python-jenkins = %{version}
Obsoletes: python-jenkins < %{version}
@@ -58,18 +68,22 @@ API. It currently supports management of:
%prep
%autosetup -p1 -n python-jenkins-%{version}
sed -i '1{\@^#!%{_bindir}/env python@d}' jenkins/__init__.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pyunittest tests/*.py
%pyunittest discover -v tests
%files %{python_files}
%license COPYING
%doc README.rst
%{python_sitelib}/*
%{python_sitelib}/jenkins
%{python_sitelib}/python_jenkins-%{version}*-info
%changelog