mirror of
https://gitlab.freedesktop.org/xorg/proto/xcbproto.git
synced 2025-12-20 04:40:09 +01:00
Require Python 3.6 or later, making conditional imports no longer required
Signed-off-by: Robert Knutsson <zybreak@gmail.com> Part-of: <https://gitlab.freedesktop.org/xorg/proto/xcbproto/-/merge_requests/64>
This commit is contained in:
parent
5305be7e11
commit
b4609e1cd7
5 changed files with 5 additions and 26 deletions
|
|
@ -14,7 +14,7 @@ if test "$XMLLINT" = "no"; then
|
|||
AC_MSG_WARN([xmllint not found; unable to validate against schema.])
|
||||
fi
|
||||
|
||||
AM_PATH_PYTHON([3.0])
|
||||
AM_PATH_PYTHON([3.6])
|
||||
|
||||
xcbincludedir='${datadir}/xcb'
|
||||
AC_SUBST(xcbincludedir)
|
||||
|
|
|
|||
|
|
@ -2,12 +2,7 @@
|
|||
This module contains helper classes for alignment arithmetic and checks
|
||||
'''
|
||||
|
||||
from sys import version_info
|
||||
|
||||
if version_info[:2] >= (3, 5):
|
||||
from math import gcd
|
||||
else:
|
||||
from fractions import gcd
|
||||
from math import gcd
|
||||
|
||||
class Alignment(object):
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,7 @@ we do not create a new type object, we just record the existing one under a new
|
|||
'''
|
||||
|
||||
from os.path import join
|
||||
from sys import version_info
|
||||
|
||||
if version_info[:2] >= (3, 3):
|
||||
from xml.etree.ElementTree import parse
|
||||
else:
|
||||
from xml.etree.cElementTree import parse
|
||||
from xml.etree.ElementTree import parse
|
||||
|
||||
from xcbgen.xtypes import *
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,7 @@
|
|||
This module contains the namespace class and the singleton module class.
|
||||
'''
|
||||
from os.path import dirname, basename
|
||||
from sys import version_info
|
||||
|
||||
if version_info[:2] >= (3, 3):
|
||||
from xml.etree.ElementTree import parse
|
||||
else:
|
||||
from xml.etree.cElementTree import parse
|
||||
|
||||
from xml.etree.ElementTree import parse
|
||||
from xcbgen import matcher
|
||||
from xcbgen.error import *
|
||||
from xcbgen.xtypes import *
|
||||
|
|
|
|||
|
|
@ -1,14 +1,9 @@
|
|||
'''
|
||||
This module contains the classes which represent XCB data types.
|
||||
'''
|
||||
import sys
|
||||
from xcbgen.expr import Field, Expression
|
||||
from xcbgen.align import Alignment, AlignmentLog
|
||||
|
||||
if sys.version_info[:2] >= (3, 3):
|
||||
from xml.etree.ElementTree import SubElement
|
||||
else:
|
||||
from xml.etree.cElementTree import SubElement
|
||||
from xml.etree.ElementTree import SubElement
|
||||
|
||||
import __main__
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue