Skip to content

Commit

Permalink
Update SCons tool
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Sep 14, 2017
1 parent 9fd26c6 commit 2e782fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/conda/python-autowig/wig.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def boost_python_builder(target, source, env):
env['AUTOWIG_ASG'] = autowig.AbstractSemanticGraph()
asg = env['AUTOWIG_ASG']
for dependency in env['AUTOWIG_DEPENDS']:
with open(os.path.join(SITE_AUTOWIG, 'ASG', dependency + '.pkl'), 'r') as filehandler:
with open(os.path.join(SITE_AUTOWIG, 'ASG', dependency + '.pkl'), 'rb') as filehandler:
asg.merge(pickle.load(filehandler))
AUTOWIG_PARSER = env['AUTOWIG_PARSER']
if not AUTOWIG_PARSER in autowig.parser:
Expand All @@ -57,7 +57,7 @@ def boost_python_builder(target, source, env):
**{kwarg[len('AUTOWIG_generator_'):] : env[kwarg] for kwarg in env.Dictionary() if isinstance(kwarg, basestring) and kwarg.startswith('AUTOWIG_generator_')})
wrappers.header.helder = env['AUTOWIG_HELDER']
wrappers.write()
with open(target[-1].abspath, 'w') as filehandler:
with open(target[-1].abspath, 'wb') as filehandler:
pickle.dump(asg, filehandler)
return None

Expand Down Expand Up @@ -92,7 +92,7 @@ def BoostPythonWIG(env, target, sources, module, decorator=None, parser='clangli
autowig_env.Depends(targets[-1], target)

if os.path.exists(targets[-1].abspath):
with open(targets[-1].abspath, 'r') as filehandler:
with open(targets[-1].abspath, 'rb') as filehandler:
autowig_env['AUTOWIG_ASG'] = pickle.load(filehandler)

autowig_env._BoostPythonWIG(targets[-1], sources)
Expand Down

0 comments on commit 2e782fb

Please sign in to comment.