Skip to content

Commit

Permalink
Update AutoWIG
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Apr 1, 2018
1 parent dea2340 commit 3a45175
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/conda/python-autowig/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ test:
- gitpython
- libboost_python-dev
commands:
- nosetests test -x -s -v -A "level <= {{ environ.get('TEST_LEVEL', 1) }} and linux" [linux]
# - nosetests test -x -s -v -A "level <= {{ environ.get('TEST_LEVEL', 1) }} and linux" [linux]
- nosetests test -x -s -v -A "level <= {{ environ.get('TEST_LEVEL', 1) }} and osx" [osx]
# - nosetests test -x -s -v -A "level <= {{ environ.get('TEST_LEVEL', 1) }} and win" [win]
7 changes: 2 additions & 5 deletions src/py/autowig/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ def pre_processing(asg, headers, flags, **kwargs):
header.is_self_contained = True
header.is_external_dependency = False

print(flags)
return "\n".join('#include "' + str(header.abspath()) + '"' for header in headers)

def post_processing(asg, flags, **kwargs):
Expand All @@ -233,7 +232,6 @@ def bootstrap(asg, flags, **kwargs):
if isinstance(bootstrap, bool):
bootstrap = float("Inf")
nodes = 0
forbidden = set()
while not nodes == len(asg) and __index < bootstrap:
nodes = len(asg)
black = set()
Expand Down Expand Up @@ -297,15 +295,14 @@ def bootstrap(asg, flags, **kwargs):
headers.append("#include \"" + header.globalname + "\"")
headers.append("")
for spc in gray:
if spc not in forbidden:
if spc not in asg._bootstrapped:
headers.append("template " + spc + ";")
forbidden.update(set(gray))
asg._bootstrapped.update(set(gray))
header = NamedTemporaryFile(delete=False)
if six.PY2:
header.write('\n'.join(headers))
else:
header.write(('\n'.join(headers)).encode())
print('\n'.join(headers))
header.close()
asg = parser(asg, [header.name], flags + ["-Wno-everything", "-ferror-limit=0"], bootstrapping=True, **kwargs)
os.unlink(header.name)
Expand Down
2 changes: 2 additions & 0 deletions src/py/autowig/asg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1539,6 +1539,7 @@ def __init__(self):
self._template_edges = dict()
self._specialization_edges = dict()
self._include_edges = dict()
self._bootstrapped = set()

def merge(self, other):
if not isinstance(other, AbstractSemanticGraph):
Expand All @@ -1551,6 +1552,7 @@ def merge(self, other):
self._template_edges.update(other._template_edges)
self._specialization_edges.update(other._specialization_edges)
self._include_edges.update(other._include_edges)
self._bootstrapped.update(other._bootstrapped)

def __len__(self):
return len(self._nodes)
Expand Down

0 comments on commit 3a45175

Please sign in to comment.