diff --git a/xcb-proto-1.13-python39.patch b/xcb-proto-1.13-python39.patch new file mode 100644 index 0000000..a3813ec --- /dev/null +++ b/xcb-proto-1.13-python39.patch @@ -0,0 +1,26 @@ +Index: xcb-proto-1.13/xcbgen/matcher.py +=================================================================== +--- xcb-proto-1.13.orig/xcbgen/matcher.py ++++ xcb-proto-1.13/xcbgen/matcher.py +@@ -7,7 +7,7 @@ we do not create a new type object, we j + ''' + + from os.path import join +-from xml.etree.cElementTree import parse ++from xml.etree.ElementTree import parse + + from xcbgen.xtypes import * + +Index: xcb-proto-1.13/xcbgen/state.py +=================================================================== +--- xcb-proto-1.13.orig/xcbgen/state.py ++++ xcb-proto-1.13/xcbgen/state.py +@@ -2,7 +2,7 @@ + This module contains the namespace class and the singleton module class. + ''' + from os.path import dirname, basename +-from xml.etree.cElementTree import parse ++from xml.etree.ElementTree import parse + + from xcbgen import matcher + from xcbgen.error import * diff --git a/xcb-proto.spec b/xcb-proto.spec index 6cb9ea5..7c82073 100644 --- a/xcb-proto.spec +++ b/xcb-proto.spec @@ -2,12 +2,16 @@ Name: xcb-proto Version: 1.13 -Release: 11%{?dist} +Release: 12%{?dist} Summary: XCB protocol descriptions License: MIT URL: https://xcb.freedesktop.org/ Source0: https://xcb.freedesktop.org/dist/%{name}-%{version}.tar.bz2 + +# cElementTree no longer exists in Python 3.9 +Patch0001: xcb-proto-1.13-python39.patch + BuildArch: noarch BuildRequires: python3-devel @@ -20,7 +24,7 @@ bindings use these protocol descriptions to generate code for marshalling the protocol. %prep -%setup -q +%autosetup -p1 %build # Bit of a hack to get the pc file in /usr/share, so we can be noarch. @@ -40,6 +44,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %{python3_sitelib}/xcbgen %changelog +* Sat May 30 2020 Björn Esser - 1.13-12 +- Add patch to fix python module for use with Python 3.9 + * Tue May 26 2020 Miro Hrončok - 1.13-11 - Rebuilt for Python 3.9