fix ctypes for Python 3.10 (RHBZ #1973621)
This commit is contained in:
parent
f1e887cb4f
commit
33ecbbb562
2 changed files with 28 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
Name: grass
|
||||
Version: 7.8.5
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
Summary: GRASS GIS - Geographic Resources Analysis Support System
|
||||
|
||||
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
|
||||
|
|
@ -27,6 +27,7 @@ Source0: https://grass.osgeo.org/%{name}%{shortver}/source/%{name}-%{version}.ta
|
|||
Patch1: grass-7.8.0-buildroot.diff
|
||||
# Fix typename collision with custom "bool" type and bool from stdbool.h
|
||||
Patch2: grass-bool.patch
|
||||
Patch3: grass78_ctypes_py3_10.diff
|
||||
|
||||
BuildRequires: bison
|
||||
%if %{with flexiblas}
|
||||
|
|
@ -180,6 +181,7 @@ GRASS GIS development headers
|
|||
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
# Correct mysql_config query
|
||||
sed -i -e 's/--libmysqld-libs/--libs/g' configure
|
||||
|
|
@ -383,6 +385,9 @@ fi
|
|||
%{_libdir}/%{name}%{shortver}/include
|
||||
|
||||
%changelog
|
||||
* Mon Jun 21 2021 Markus Neteler <neteler@mundialis.de> - 7.8.5-8
|
||||
- fix ctypes for Python 3.10 (RHBZ #1973621)
|
||||
|
||||
* Fri May 07 2021 Sandro Mani <manisandro@gmail.com> - 7.8.5-7
|
||||
- Rebuild (gdal)
|
||||
|
||||
|
|
|
|||
22
grass78_ctypes_py3_10.diff
Normal file
22
grass78_ctypes_py3_10.diff
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff --git grass-7.8.5/lib/python/ctypes/ctypesgencore/parser/lex.py grass-7.8.5-new/lib/python/ctypes/ctypesgencore/parser/lex.py
|
||||
index 294d902d9..0d1447400 100644
|
||||
--- grass-7.8.5/lib/python/ctypes/ctypesgencore/parser/lex.py
|
||||
+++ grass-7.8.5-new/lib/python/ctypes/ctypesgencore/parser/lex.py
|
||||
@@ -348,7 +348,7 @@ class Lexer:
|
||||
break
|
||||
|
||||
# if func not callable, it means it's an ignored token
|
||||
- if not isinstance(func, collections.Callable):
|
||||
+ if not isinstance(func, collections.abc.Callable):
|
||||
break
|
||||
|
||||
# If token is processed by a function, call it
|
||||
@@ -720,7 +720,7 @@ def lex(module=None, object=None, debug=0, optimize=0,
|
||||
states, tokname = _statetoken(f, stateinfo)
|
||||
toknames[f] = tokname
|
||||
|
||||
- if isinstance(t, collections.Callable):
|
||||
+ if isinstance(t, collections.abc.Callable):
|
||||
for s in states:
|
||||
funcsym[s].append((f, t))
|
||||
elif (isinstance(t, bytes) or isinstance(t, str)):
|
||||
Loading…
Add table
Add a link
Reference in a new issue