浏览代码

On Windows, invoke preprocessor via sh.exe

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43120 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 15 年之前
父节点
当前提交
65eef4767a
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      lib/python/ctypes/ctypesgencore/parser/preprocessor.py

+ 3 - 0
lib/python/ctypes/ctypesgencore/parser/preprocessor.py

@@ -141,6 +141,9 @@ class PreprocessorParser(object):
 
         self.cparser.handle_status(cmd)
         
+        if sys.platform == 'win32':
+            cmd = ['sh.exe', '-c', cmd]
+
         pp = subprocess.Popen(cmd,
                               shell = True,
                               stdout = subprocess.PIPE,