提交 913b1a57 authored 作者: Garming Sam's avatar Garming Sam

lazylinker_c: Make sure that the version number is flushed to disk

上级 e0496181
......@@ -127,7 +127,8 @@ except ImportError:
preargs=args)
# Save version into the __init__.py file.
init_py = os.path.join(loc, '__init__.py')
open(init_py, 'w').write('_version = %s\n' % version)
with open(init_py, 'w') as f:
f.write('_version = %s\n' % version)
# If we just compiled the module for the first time, then it was
# imported at the same time: we need to make sure we do not
# reload the now outdated __init__.pyc below.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论