forked from pool/libgusb
Dominique Leuenberger
5da6cffbbf
- Add no-pkg-resources.patch to fix the crash with missing Python pkg_resources pacakge (removd in Python 3.10). OBS-URL: https://build.opensuse.org/request/show/993301 OBS-URL: https://build.opensuse.org/package/show/hardware/libgusb?expand=0&rev=39
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
---
|
|
contrib/generate-version-script.py | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
--- a/contrib/generate-version-script.py
|
|
+++ b/contrib/generate-version-script.py
|
|
@@ -7,7 +7,7 @@
|
|
import sys
|
|
import xml.etree.ElementTree as ET
|
|
|
|
-from pkg_resources import parse_version
|
|
+from packaging.version import parse
|
|
|
|
XMLNS = '{http://www.gtk.org/introspection/core/1.0}'
|
|
XMLNS_C = '{http://www.gtk.org/introspection/c/1.0}'
|
|
@@ -54,14 +54,14 @@ class LdVersionScript:
|
|
for node in cls.findall(XMLNS + 'method'):
|
|
version_tmp = self._add_node(node)
|
|
if version_tmp:
|
|
- if not version_lowest or parse_version(version_tmp) < parse_version(version_lowest):
|
|
+ if not version_lowest or parse(version_tmp) < parse(version_lowest):
|
|
version_lowest = version_tmp
|
|
|
|
# add the constructor
|
|
for node in cls.findall(XMLNS + 'constructor'):
|
|
version_tmp = self._add_node(node)
|
|
if version_tmp:
|
|
- if not version_lowest or parse_version(version_tmp) < parse_version(version_lowest):
|
|
+ if not version_lowest or parse(version_tmp) < parse(version_lowest):
|
|
version_lowest = version_tmp
|
|
|
|
if '{http://www.gtk.org/introspection/glib/1.0}get-type' not in cls.attrib:
|
|
@@ -93,7 +93,7 @@ class LdVersionScript:
|
|
# output the version data to a file
|
|
verout = '# generated automatically, do not edit!\n'
|
|
oldversion = None
|
|
- for version in sorted(versions, key=parse_version):
|
|
+ for version in sorted(versions, key=parse):
|
|
symbols = sorted(self.releases[version])
|
|
verout += '\n%s_%s {\n' % (self.library_name, version)
|
|
verout += ' global:\n'
|