summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2012-10-10 14:52:48 -0700
committerPaul Berry <[email protected]>2012-10-16 12:03:55 -0700
commit155eff56b1c0a3a6119952db97f2fc5cb5f19e46 (patch)
treea5bc0bf02bfc83bbe7ca3238d09e29fb4429a9b7 /src
parente378cd77bc63ebeaec42030da8f5ceb1d9c4be10 (diff)
mapi_abi: Collect all imports at top of file.
Tested-by: Matt Turner <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mapi/mapi/mapi_abi.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/mapi/mapi/mapi_abi.py b/src/mapi/mapi/mapi_abi.py
index c18dd82d6e5..4fd15820d38 100644
--- a/src/mapi/mapi/mapi_abi.py
+++ b/src/mapi/mapi/mapi_abi.py
@@ -34,6 +34,11 @@ sys.path.append(GLAPI)
import re
from optparse import OptionParser
+import gl_XML
+import glX_XML
+import copy
+from gles_api import es1_api, es2_api
+
# number of dynamic entries
ABI_NUM_DYNAMIC_ENTRIES = 256
@@ -133,8 +138,6 @@ class ABIEntry(object):
def abi_parse_xml(xml):
"""Parse a GLAPI XML file for ABI entries."""
- import gl_XML, glX_XML
-
api = gl_XML.parse_GL_API(xml, glX_XML.glx_item_factory())
entry_dict = {}
@@ -711,8 +714,6 @@ class GLAPIPrinter(ABIPrinter):
def _get_api_entries(self, entries, api):
"""Override the entry attributes according to API."""
- import copy
-
# no override
if api is None:
return entries
@@ -760,8 +761,6 @@ class ES1APIPrinter(GLAPIPrinter):
"""OpenGL ES 1.x API Printer"""
def __init__(self, entries):
- from gles_api import es1_api
-
super(ES1APIPrinter, self).__init__(entries, es1_api)
self.prefix_lib = 'gl'
self.prefix_warn = 'gl'
@@ -779,8 +778,6 @@ class ES2APIPrinter(GLAPIPrinter):
"""OpenGL ES 2.x API Printer"""
def __init__(self, entries):
- from gles_api import es2_api
-
super(ES2APIPrinter, self).__init__(entries, es2_api)
self.prefix_lib = 'gl'
self.prefix_warn = 'gl'