forked from pool/python-python-jenkins
- 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
47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
---
|
|
jenkins/plugins.py | 5 +++--
|
|
requirements.txt | 4 ++--
|
|
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
Index: python-jenkins-1.8.0/jenkins/plugins.py
|
|
===================================================================
|
|
--- python-jenkins-1.8.0.orig/jenkins/plugins.py
|
|
+++ python-jenkins-1.8.0/jenkins/plugins.py
|
|
@@ -43,6 +43,7 @@ import operator
|
|
import re
|
|
|
|
import pkg_resources
|
|
+import packaging.version
|
|
|
|
|
|
class Plugin(dict):
|
|
@@ -76,14 +77,14 @@ class PluginVersion(str):
|
|
'''Parse plugin version and store it for comparison.'''
|
|
|
|
self._version = version
|
|
- self.parsed_version = pkg_resources.parse_version(
|
|
+ self.parsed_version = packaging.version.parse(
|
|
self.__convert_version(version))
|
|
|
|
def __convert_version(self, version):
|
|
return self._VERSION_RE.sub(r'\g<1>.preview', str(version))
|
|
|
|
def __compare(self, op, version):
|
|
- return op(self.parsed_version, pkg_resources.parse_version(
|
|
+ return op(self.parsed_version, packaging.version.parse(
|
|
self.__convert_version(version)))
|
|
|
|
def __le__(self, version):
|
|
Index: python-jenkins-1.8.0/requirements.txt
|
|
===================================================================
|
|
--- python-jenkins-1.8.0.orig/requirements.txt
|
|
+++ python-jenkins-1.8.0/requirements.txt
|
|
@@ -1,5 +1,5 @@
|
|
-# Setuptools removed support for PEP 440 non-conforming versions
|
|
-setuptools<66
|
|
+setuptools
|
|
+packaging
|
|
six>=1.3.0
|
|
pbr>=0.8.2
|
|
multi_key_dict
|