Accepting request 993301 from home:mcepl:branches:hardware
- 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
This commit is contained in:
parent
a93fd3666e
commit
5da6cffbbf
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 5 11:30:24 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add no-pkg-resources.patch to fix the crash with missing Python
|
||||||
|
pkg_resources pacakge (removd in Python 3.10).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 9 07:58:08 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>
|
Mon May 9 07:58:08 UTC 2022 - Paolo Stivanin <info@paolostivanin.com>
|
||||||
|
|
||||||
|
@ -25,9 +25,14 @@ Group: Development/Libraries/GNOME
|
|||||||
URL: https://github.com/hughsie/libgusb
|
URL: https://github.com/hughsie/libgusb
|
||||||
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
|
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
|
||||||
Source99: baselibs.conf
|
Source99: baselibs.conf
|
||||||
|
# PATCH-FIX-UPSTREAM no-pkg-resources.patch gh#hughsie/libgusb#61 mcepl@suse.com
|
||||||
|
# Don't rely on the obsolete version of pkg_resources
|
||||||
|
Patch0: no-pkg-resources.patch
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: gtk-doc
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: python3-base
|
||||||
|
BuildRequires: python3-packaging
|
||||||
BuildRequires: vala
|
BuildRequires: vala
|
||||||
BuildRequires: pkgconfig(glib-2.0) >= 2.44.0
|
BuildRequires: pkgconfig(glib-2.0) >= 2.44.0
|
||||||
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.29
|
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.29
|
||||||
@ -69,7 +74,7 @@ asynchronous control, bulk and interrupt transfers with proper
|
|||||||
cancellation and integration into a mainloop.
|
cancellation and integration into a mainloop.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%meson
|
%meson
|
||||||
|
41
no-pkg-resources.patch
Normal file
41
no-pkg-resources.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
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'
|
Loading…
Reference in New Issue
Block a user