forked from pool/python-jenkinsapi
Accepting request 1095526 from devel:languages:python
- Update to 0.3.13: * Unable to locate upstream changelog. - Re-add missing BuildRequires on six. - Stop using greedy globs in %files. - Rebase python-jenkinsapi-no-mock.patch - Add missing Requires on update-alternatives - Switch to autosetup ------------------------------------------------------------------ OBS-URL: https://build.opensuse.org/request/show/1095526 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-jenkinsapi?expand=0&rev=12
This commit is contained in:
commit
68abee4937
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a212a244b0a6022a61657746c8120ac9b6db83432371b345154075eb8faceb61
|
||||
size 143830
|
3
jenkinsapi-0.3.13.tar.gz
Normal file
3
jenkinsapi-0.3.13.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:246a98a63e61f54a15d16105cb15488c5670734df41e86c7af0d5d9c0af240b9
|
||||
size 127864
|
@ -1,16 +1,18 @@
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_artifact.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_artifact.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_artifact.py 2022-05-03 09:35:57.849050984 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_artifact.py 2022-05-03 09:36:46.685349578 +0200
|
||||
Index: jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_artifact.py
|
||||
===================================================================
|
||||
--- jenkinsapi-0.3.13.orig/jenkinsapi_tests/unittests/test_artifact.py
|
||||
+++ jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_artifact.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-from mock import (
|
||||
+from unittest.mock import (
|
||||
Mock,
|
||||
patch,
|
||||
call
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_executors.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_executors.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_executors.py 2022-05-03 09:35:57.849050984 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_executors.py 2022-05-03 09:36:46.685349578 +0200
|
||||
-from mock import Mock, patch, call
|
||||
+from unittest.mock import Mock, patch, call
|
||||
from requests.exceptions import HTTPError
|
||||
from jenkinsapi.artifact import Artifact
|
||||
from jenkinsapi.jenkinsbase import JenkinsBase
|
||||
Index: jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_executors.py
|
||||
===================================================================
|
||||
--- jenkinsapi-0.3.13.orig/jenkinsapi_tests/unittests/test_executors.py
|
||||
+++ jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_executors.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
@ -18,9 +20,10 @@ diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_executors.py je
|
||||
from jenkinsapi.jenkins import Jenkins
|
||||
from jenkinsapi.executors import Executors
|
||||
from jenkinsapi.executor import Executor
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job_folders.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_job_folders.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job_folders.py 2022-05-03 09:35:57.853051009 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_job_folders.py 2022-05-03 09:36:46.685349578 +0200
|
||||
Index: jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_job_folders.py
|
||||
===================================================================
|
||||
--- jenkinsapi-0.3.13.orig/jenkinsapi_tests/unittests/test_job_folders.py
|
||||
+++ jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_job_folders.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import pytest
|
||||
-import mock
|
||||
@ -28,18 +31,20 @@ diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job_folders.py
|
||||
from jenkinsapi.jenkins import JenkinsBase
|
||||
|
||||
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job_get_all_builds.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_job_get_all_builds.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job_get_all_builds.py 2022-05-03 09:35:57.853051009 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_job_get_all_builds.py 2022-05-03 09:36:46.685349578 +0200
|
||||
Index: jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_job_get_all_builds.py
|
||||
===================================================================
|
||||
--- jenkinsapi-0.3.13.orig/jenkinsapi_tests/unittests/test_job_get_all_builds.py
|
||||
+++ jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_job_get_all_builds.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
# To run unittests on python 2.6 please use unittest2 library
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_job.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job.py 2022-05-03 09:35:57.853051009 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_job.py 2022-05-03 09:36:46.685349578 +0200
|
||||
Index: jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_job.py
|
||||
===================================================================
|
||||
--- jenkinsapi-0.3.13.orig/jenkinsapi_tests/unittests/test_job.py
|
||||
+++ jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_job.py
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import pytest
|
||||
@ -48,18 +53,10 @@ diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job.py jenkinsa
|
||||
import json
|
||||
from . import configs
|
||||
from jenkinsapi.job import Job
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job_scm_hg.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_job_scm_hg.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_job_scm_hg.py 2022-05-03 09:35:57.853051009 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_job_scm_hg.py 2022-05-03 09:36:46.689349602 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
# To run unittests on python 2.6 please use unittest2 library
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_plugins.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_plugins.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_plugins.py 2022-05-03 09:35:57.853051009 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_plugins.py 2022-05-03 09:36:46.689349602 +0200
|
||||
Index: jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_plugins.py
|
||||
===================================================================
|
||||
--- jenkinsapi-0.3.13.orig/jenkinsapi_tests/unittests/test_plugins.py
|
||||
+++ jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_plugins.py
|
||||
@@ -1,7 +1,7 @@
|
||||
"""
|
||||
jenkinsapi_tests.test_plugins
|
||||
@ -69,45 +66,46 @@ diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_plugins.py jenk
|
||||
|
||||
# To run unittests on python 2.6 please use unittest2 library
|
||||
try:
|
||||
@@ -215,7 +215,7 @@ class TestPlugins(unittest.TestCase):
|
||||
@mock.patch.object(Plugins, '_poll')
|
||||
@mock.patch.object(Plugins, 'plugin_version_already_installed')
|
||||
@mock.patch.object(Plugins, 'restart_required',
|
||||
- new_callable=mock.mock.PropertyMock)
|
||||
+ new_callable=unittest.mock.PropertyMock)
|
||||
@mock.patch.object(Plugins, '_wait_until_plugin_installed')
|
||||
@mock.patch.object(Requester, 'post_xml_and_confirm_status')
|
||||
@mock.patch.object(Jenkins, 'safe_restart')
|
||||
@@ -234,7 +234,7 @@ class TestPlugins(unittest.TestCase):
|
||||
@mock.patch.object(Plugins, '_poll')
|
||||
@mock.patch.object(Plugins, 'plugin_version_already_installed')
|
||||
@mock.patch.object(Plugins, 'restart_required',
|
||||
- new_callable=mock.mock.PropertyMock)
|
||||
+ new_callable=unittest.mock.PropertyMock)
|
||||
@mock.patch.object(Plugins, '_wait_until_plugin_installed')
|
||||
@mock.patch.object(Requester, 'post_xml_and_confirm_status')
|
||||
@mock.patch.object(Jenkins, 'safe_restart')
|
||||
@@ -284,7 +284,7 @@ class TestPlugins(unittest.TestCase):
|
||||
|
||||
@mock.patch.object(Plugins, '_poll')
|
||||
@mock.patch.object(Plugins, 'update_center_install_status',
|
||||
- new_callable=mock.mock.PropertyMock)
|
||||
+ new_callable=unittest.mock.PropertyMock)
|
||||
def test_restart_required_after_plugin_installation(self, status,
|
||||
_poll_plugins):
|
||||
_poll_plugins.return_value = self.DATA
|
||||
@@ -305,7 +305,7 @@ class TestPlugins(unittest.TestCase):
|
||||
|
||||
@mock.patch.object(Plugins, '_poll')
|
||||
@mock.patch.object(Plugins, 'update_center_install_status',
|
||||
- new_callable=mock.mock.PropertyMock)
|
||||
+ new_callable=unittest.mock.PropertyMock)
|
||||
def test_restart_not_required_after_plugin_installation(self, status,
|
||||
_poll_plugins):
|
||||
_poll_plugins.return_value = self.DATA
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_requester.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_requester.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_requester.py 2022-05-03 09:35:57.853051009 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_requester.py 2022-05-03 09:36:46.689349602 +0200
|
||||
@@ -226,7 +226,7 @@ class TestPlugins(unittest.TestCase):
|
||||
@mock.patch.object(Plugins, "_poll")
|
||||
@mock.patch.object(Plugins, "plugin_version_already_installed")
|
||||
@mock.patch.object(
|
||||
- Plugins, "restart_required", new_callable=mock.mock.PropertyMock
|
||||
+ Plugins, "restart_required", new_callable=mock.PropertyMock
|
||||
)
|
||||
@mock.patch.object(Plugins, "_wait_until_plugin_installed")
|
||||
@mock.patch.object(Requester, "post_xml_and_confirm_status")
|
||||
@@ -252,7 +252,7 @@ class TestPlugins(unittest.TestCase):
|
||||
@mock.patch.object(Plugins, "_poll")
|
||||
@mock.patch.object(Plugins, "plugin_version_already_installed")
|
||||
@mock.patch.object(
|
||||
- Plugins, "restart_required", new_callable=mock.mock.PropertyMock
|
||||
+ Plugins, "restart_required", new_callable=mock.PropertyMock
|
||||
)
|
||||
@mock.patch.object(Plugins, "_wait_until_plugin_installed")
|
||||
@mock.patch.object(Requester, "post_xml_and_confirm_status")
|
||||
@@ -316,7 +316,7 @@ class TestPlugins(unittest.TestCase):
|
||||
@mock.patch.object(
|
||||
Plugins,
|
||||
"update_center_install_status",
|
||||
- new_callable=mock.mock.PropertyMock,
|
||||
+ new_callable=mock.PropertyMock,
|
||||
)
|
||||
def test_restart_required_after_plugin_installation(
|
||||
self, status, _poll_plugins
|
||||
@@ -343,7 +343,7 @@ class TestPlugins(unittest.TestCase):
|
||||
@mock.patch.object(
|
||||
Plugins,
|
||||
"update_center_install_status",
|
||||
- new_callable=mock.mock.PropertyMock,
|
||||
+ new_callable=mock.PropertyMock,
|
||||
)
|
||||
def test_restart_not_required_after_plugin_installation(
|
||||
self, status, _poll_plugins
|
||||
Index: jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_requester.py
|
||||
===================================================================
|
||||
--- jenkinsapi-0.3.13.orig/jenkinsapi_tests/unittests/test_requester.py
|
||||
+++ jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_requester.py
|
||||
@@ -3,7 +3,7 @@ import pytest
|
||||
import requests
|
||||
from jenkinsapi.jenkins import Requester
|
||||
@ -117,47 +115,13 @@ diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_requester.py je
|
||||
|
||||
|
||||
def test_no_parameters_uses_default_values():
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_result_set.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_result_set.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_result_set.py 2022-05-03 09:35:57.853051009 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_result_set.py 2022-05-03 09:36:46.689349602 +0200
|
||||
Index: jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_result_set.py
|
||||
===================================================================
|
||||
--- jenkinsapi-0.3.13.orig/jenkinsapi_tests/unittests/test_result_set.py
|
||||
+++ jenkinsapi-0.3.13/jenkinsapi_tests/unittests/test_result_set.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
# To run unittests on python 2.6 please use unittest2 library
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
@@ -30,7 +30,7 @@ class TestResultSet(unittest.TestCase):
|
||||
'className': 'nose.failure.Failure',
|
||||
'duration': 0.0,
|
||||
'errorDetails': 'No module named mock',
|
||||
- 'errorStackTrace': 'Traceback (most recent call last):\n File "/usr/lib/python2.7/unittest/case.py", line 332, in run\n testMethod()\n File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 390, in loadTestsFromName\n addr.filename, addr.module)\n File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 39, in importFromPath\n return self.importFromDir(dir_path, fqname)\n File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 86, in importFromDir\n mod = load_module(part_fqname, fh, filename, desc)\n File "/var/lib/jenkins/jobs/test_jenkinsapi/workspace/jenkinsapi/src/jenkinsapi_tests/unittests/test_build.py", line 1, in <module>\n import mock\nImportError: No module named mock\n', # noqa
|
||||
+ 'errorStackTrace': 'Traceback (most recent call last):\n File "/usr/lib/python2.7/unittest/case.py", line 332, in run\n testMethod()\n File "/usr/lib/python2.7/dist-packages/nose/loader.py", line 390, in loadTestsFromName\n addr.filename, addr.module)\n File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 39, in importFromPath\n return self.importFromDir(dir_path, fqname)\n File "/usr/lib/python2.7/dist-packages/nose/importer.py", line 86, in importFromDir\n mod = load_module(part_fqname, fh, filename, desc)\n File "/var/lib/jenkins/jobs/test_jenkinsapi/workspace/jenkinsapi/src/jenkinsapi_tests/unittests/test_build.py", line 1, in <module>\n from unittest import mock\nImportError: No module named mock\n', # noqa
|
||||
'failedSince': 88,
|
||||
'name': 'runTest',
|
||||
'skipped': False,
|
||||
diff -upr jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_view.py jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_view.py
|
||||
--- jenkinsapi-0.3.11.orig/jenkinsapi_tests/unittests/test_view.py 2022-05-03 09:35:57.849050984 +0200
|
||||
+++ jenkinsapi-0.3.11/jenkinsapi_tests/unittests/test_view.py 2022-05-03 09:36:46.689349602 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-import mock
|
||||
+from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -60,13 +60,13 @@ JOB_DATA = {
|
||||
|
||||
@pytest.fixture
|
||||
def jenkins():
|
||||
- jenkins = mock.MagicMock(auto_spec=True)
|
||||
+ jenkins = mock.MagicMock(autospec=True)
|
||||
jenkins.has_job.return_value = False
|
||||
return jenkins
|
||||
|
||||
|
||||
-@mock.patch.object(Job, '_poll', auto_spec=True)
|
||||
-@mock.patch.object(View, '_poll', auto_spec=True)
|
||||
+@mock.patch.object(Job, '_poll', autospec=True)
|
||||
+@mock.patch.object(View, '_poll', autospec=True)
|
||||
@pytest.fixture
|
||||
def view(_view_poll, _job_poll, jenkins):
|
||||
_view_poll.return_value = DATA
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 27 06:38:58 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 0.3.13:
|
||||
* Unable to locate upstream changelog.
|
||||
- Re-add missing BuildRequires on six.
|
||||
- Stop using greedy globs in %files.
|
||||
- Rebase python-jenkinsapi-no-mock.patch
|
||||
- Add missing Requires on update-alternatives
|
||||
- Switch to autosetup
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 07:40:34 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
@ -11,7 +22,7 @@ Fri Apr 17 06:51:42 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
- use pytest -k instead of removing tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
------------------------------------------------------------------
|
||||
Thu Apr 16 12:13:33 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
- version update to 0.3.11
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-jenkinsapi
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,13 +16,11 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-jenkinsapi
|
||||
Version: 0.3.11
|
||||
Version: 0.3.13
|
||||
Release: 0
|
||||
Summary: A Python API for accessing resources on a Jenkins continuous integration server
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/salimfadhley/jenkinsapi
|
||||
Source: https://files.pythonhosted.org/packages/source/j/jenkinsapi/jenkinsapi-%{version}.tar.gz
|
||||
# https://github.com/pycontribs/jenkinsapi/issues/819
|
||||
@ -36,12 +34,15 @@ BuildRequires: python-rpm-macros
|
||||
Requires: python-pytz >= 2014.4
|
||||
Requires: python-requests >= 2.3.0
|
||||
Requires: python-six >= 1.10.0
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module astroid >= 1.4.8}
|
||||
BuildRequires: %{python_module pytest-mock}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module requests-kerberos}
|
||||
BuildRequires: %{python_module six}
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
@ -70,8 +71,8 @@ and has
|
||||
* Ability to add/remove/modify Jenkins views
|
||||
|
||||
%prep
|
||||
%setup -q -n jenkinsapi-%{version}
|
||||
%patch0 -p1
|
||||
%autosetup -p1 -n jenkinsapi-%{version}
|
||||
rm pyproject.toml # Just utterly broken
|
||||
|
||||
%build
|
||||
%python_build
|
||||
@ -100,6 +101,8 @@ and has
|
||||
%license license.txt
|
||||
%python_alternative %{_bindir}/jenkins_invoke
|
||||
%python_alternative %{_bindir}/jenkinsapi_version
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/jenkinsapi
|
||||
%{python_sitelib}/jenkinsapi_tests
|
||||
%{python_sitelib}/jenkinsapi-%{version}-*-info
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user