Skip to content

Commit

Permalink
Update for Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Aug 26, 2017
1 parent b90e6eb commit c9b9ce5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/py/autowig/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from .plugin import PluginManager
import sys
import platform
import six

from .asg import (DeclarationProxy,
NamespaceProxy,
Expand Down Expand Up @@ -140,6 +141,8 @@ def pre_processing(asg, headers, flags, **kwargs):
warnings.warn('System includes not computed: clang command failed', Warning)
else:
out, err = s.communicate()
if six.PY3:
err = err.decode('ascii', 'ignore')
sysincludes = err.splitlines()
if '#include <...> search starts here:' not in sysincludes or 'End of search list.' not in sysincludes:
warnings.warn('System includes not computed: parsing clang command output failed', Warning)
Expand Down
1 change: 1 addition & 0 deletions src/py/autowig/libclang_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import os
import warnings
import uuid
import six

from .asg import (CharTypeProxy,
UnsignedCharTypeProxy,
Expand Down

0 comments on commit c9b9ce5

Please sign in to comment.