[GRASS-SVN] r68349 - in grass/trunk/lib/python/ctypes/ctypesgencore: . parser printer processor

svn_grass at osgeo.org svn_grass at osgeo.org
Mon May 2 09:06:47 PDT 2016


Author: zarch
Date: 2016-05-02 09:06:47 -0700 (Mon, 02 May 2016)
New Revision: 68349

Modified:
   grass/trunk/lib/python/ctypes/ctypesgencore/expressions.py
   grass/trunk/lib/python/ctypes/ctypesgencore/libraryloader.py
   grass/trunk/lib/python/ctypes/ctypesgencore/options.py
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/cgrammar.py
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/cparser.py
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/lex.py
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/pplexer.py
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
   grass/trunk/lib/python/ctypes/ctypesgencore/parser/yacc.py
   grass/trunk/lib/python/ctypes/ctypesgencore/printer/preamble.py
   grass/trunk/lib/python/ctypes/ctypesgencore/printer/printer.py
   grass/trunk/lib/python/ctypes/ctypesgencore/processor/dependencies.py
   grass/trunk/lib/python/ctypes/ctypesgencore/processor/operations.py
   grass/trunk/lib/python/ctypes/ctypesgencore/processor/pipeline.py
Log:
ctypes: sort import library order

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/expressions.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/expressions.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/expressions.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -6,9 +6,11 @@
 which returns a Python string representing that expression.
 '''
 
-from ctypedescs import *
 import keyword
 
+from ctypedescs import *
+
+
 # Right now, the objects in this module are all oriented toward evaluation.
 # However, they don't have to be, since ctypes objects are mutable. For example,
 # shouldn't it be possible to translate the macro:

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/libraryloader.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/libraryloader.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/libraryloader.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -32,10 +32,11 @@
 # POSSIBILITY OF SUCH DAMAGE.
 # ----------------------------------------------------------------------------
 
+import glob
 import os.path
 import re
 import sys
-import glob
+
 import ctypes
 import ctypes.util
 

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/options.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/options.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/options.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -8,9 +8,10 @@
 for convenience.
 """
 
+import copy
 import optparse
-import copy
 
+
 default_values = {
     "other_headers": [],
     "modules": [],

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/cgrammar.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/cgrammar.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/cgrammar.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -20,11 +20,11 @@
 import time
 import warnings
 
+import cdeclarations
+import ctypesgencore.expressions as expressions
+import ctypesparser
 import preprocessor
 import yacc
-import ctypesparser
-import ctypesgencore.expressions as expressions
-import cdeclarations
 
 tokens = (
     'PP_DEFINE', 'PP_DEFINE_NAME', 'PP_DEFINE_MACRO_NAME', 'PP_MACRO_PARAM',

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/cparser.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/cparser.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/cparser.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -16,11 +16,12 @@
 import time
 import warnings
 
+import cdeclarations
+import cgrammar
 import preprocessor
 import yacc
-import cgrammar
-import cdeclarations
 
+
 # --------------------------------------------------------------------------
 # Lexer
 # --------------------------------------------------------------------------

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/ctypesparser.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -12,9 +12,9 @@
 
 __all__ = ["CtypesParser"]
 
+from cdeclarations import *
 from cparser import *
 from ctypesgencore.ctypedescs import *
-from cdeclarations import *
 from ctypesgencore.expressions import *
 
 

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/datacollectingparser.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -7,13 +7,14 @@
 calling DataCollectingParser.data().
 """
 
+import os
+from tempfile import mkstemp
+
 import ctypesparser
+from ctypesgencore.ctypedescs import *
 from ctypesgencore.descriptions import *
-from ctypesgencore.ctypedescs import *
 from ctypesgencore.expressions import *
 from ctypesgencore.messages import *
-from tempfile import mkstemp
-import os
 
 
 class DataCollectingParser(ctypesparser.CtypesParser,

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/lex.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/lex.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/lex.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -26,10 +26,10 @@
 
 __version__ = "2.2"
 
+import os.path
 import re
 import sys
 import types
-import os.path
 
 # Regular expression used to match valid token names
 _is_identifier = re.compile(r'^[a-zA-Z0-9_]+$')

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/pplexer.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/pplexer.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/pplexer.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -15,10 +15,11 @@
 import shlex
 import sys
 import tokenize
+import traceback
+
+import ctypes
 import lex
 import yacc
-import traceback
-import ctypes
 from lex import TOKEN
 
 tokens = (

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/preprocessor.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -13,16 +13,18 @@
 import os
 import re
 import shlex
+import subprocess
 import sys
 import tokenize
+import traceback
+
+import ctypes
 import lex
+import pplexer
 import yacc
-import traceback
-import subprocess
-import ctypes
 from lex import TOKEN
-import pplexer
 
+
 # --------------------------------------------------------------------------
 # Lexers
 # --------------------------------------------------------------------------

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/parser/yacc.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/parser/yacc.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/parser/yacc.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -69,11 +69,11 @@
 
 error_count = 3                # Number of symbols that must be shifted to leave recovery mode
 
+import cStringIO
+import os.path
 import re
+import sys
 import types
-import sys
-import cStringIO
-import os.path
 
 # <tm> 1 July 2008
 try:

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/printer/preamble.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/printer/preamble.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/printer/preamble.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -1,6 +1,7 @@
-import ctypes
 import os
 import sys
+
+import ctypes
 from ctypes import *
 
 _int_types = (c_int16, c_int32)

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/printer/printer.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/printer/printer.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/printer/printer.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -2,15 +2,15 @@
 
 import os
 import sys
+import test  # So we can find the path to local files in the printer package
 import time
+
+import ctypesgencore.libraryloader  # So we can get the path to it
+from ctypesgencore.ctypedescs import *
 from ctypesgencore.descriptions import *
-from ctypesgencore.ctypedescs import *
 from ctypesgencore.messages import *
 
-import ctypesgencore.libraryloader  # So we can get the path to it
-import test  # So we can find the path to local files in the printer package
 
-
 def path_to_local_file(name, known_local_module=test):
     basedir = os.path.dirname(known_local_module.__file__)
     return os.path.join(basedir, name)

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/processor/dependencies.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/processor/dependencies.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/processor/dependencies.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -5,8 +5,8 @@
 descriptions.
 """
 
+from ctypesgencore.ctypedescs import *
 from ctypesgencore.descriptions import *
-from ctypesgencore.ctypedescs import *
 from ctypesgencore.messages import *
 
 

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/processor/operations.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/processor/operations.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/processor/operations.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -6,15 +6,17 @@
 ctypesgencore.processor.pipeline calls the operations module.
 """
 
-import ctypes
+import keyword
+import os
 import re
-import os
 import sys
-import keyword
+
+import ctypes
+import ctypesgencore.libraryloader
 from ctypesgencore.descriptions import *
 from ctypesgencore.messages import *
-import ctypesgencore.libraryloader
 
+
 # Processor functions
 
 

Modified: grass/trunk/lib/python/ctypes/ctypesgencore/processor/pipeline.py
===================================================================
--- grass/trunk/lib/python/ctypes/ctypesgencore/processor/pipeline.py	2016-05-02 16:06:24 UTC (rev 68348)
+++ grass/trunk/lib/python/ctypes/ctypesgencore/processor/pipeline.py	2016-05-02 16:06:47 UTC (rev 68349)
@@ -1,13 +1,15 @@
 #!/usr/bin/env python
 
+import os
+import re
+
 import ctypes
-import re
-import os
-from ctypesgencore.processor.operations import *
-from ctypesgencore.processor.dependencies import find_dependencies
 from ctypesgencore.ctypedescs import *
 from ctypesgencore.messages import *
+from ctypesgencore.processor.dependencies import find_dependencies
+from ctypesgencore.processor.operations import *
 
+
 """
 A brief explanation of the processing steps:
 1. The dependencies module builds a dependency graph for the descriptions.



More information about the grass-commit mailing list