diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-11-25 22:39:15 +0000 |
commit | d934827bf44b7cfcf6711964418148fa60877668 (patch) | |
tree | 0625f358789b5e015e49db139cc1dbc9be00428f /x11-base/xcb-proto/files | |
parent | 2e34d110f164bf74d55fced27fe0000201b3eec5 (diff) |
gentoo resync : 25.11.2020
Diffstat (limited to 'x11-base/xcb-proto/files')
-rw-r--r-- | x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch b/x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch new file mode 100644 index 000000000000..358cd629eb6d --- /dev/null +++ b/x11-base/xcb-proto/files/xcb-proto-1.14-python3_9.patch @@ -0,0 +1,54 @@ +diff --git a/xcbgen/align.py b/xcbgen/align.py +index d4c12ee40195cb1986796bed009f5ba70dede1d3..5c4f5177dcb14753dabe6f0c8fee57781202efba 100644 +--- a/xcbgen/align.py ++++ b/xcbgen/align.py +@@ -2,7 +2,12 @@ + This module contains helper classes for alignment arithmetic and checks + ''' + +-from fractions import gcd ++from sys import version_info ++ ++if version_info[:2] >= (3, 5): ++ from math import gcd ++else: ++ from fractions import gcd + + class Alignment(object): + +diff --git a/xcbgen/matcher.py b/xcbgen/matcher.py +index 97a8b43bb24d29b6414b1e139c73cde966118ea8..a13ef2846fda2d2be249ca0c5dd06d35b90cf6cc 100644 +--- a/xcbgen/matcher.py ++++ b/xcbgen/matcher.py +@@ -7,7 +7,12 @@ we do not create a new type object, we just record the existing one under a new + ''' + + from os.path import join +-from xml.etree.cElementTree import parse ++from sys import version_info ++ ++if version_info[:2] >= (3, 9): ++ from xml.etree.ElementTree import parse ++else: ++ from xml.etree.cElementTree import parse + + from xcbgen.xtypes import * + +diff --git a/xcbgen/state.py b/xcbgen/state.py +index 0dbecdc7b6f96bbf5f0e549787b20f9986039f1b..3b7eeb42bec1b00e5253aa93e58e0cd1fb7a3389 100644 +--- a/xcbgen/state.py ++++ b/xcbgen/state.py +@@ -2,7 +2,12 @@ + This module contains the namespace class and the singleton module class. + ''' + from os.path import dirname, basename +-from xml.etree.cElementTree import parse ++from sys import version_info ++ ++if version_info[:2] >= (3, 9): ++ from xml.etree.ElementTree import parse ++else: ++ from xml.etree.cElementTree import parse + + from xcbgen import matcher + from xcbgen.error import * |