Unverified 提交 757b4d59 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #6565 from GSam/minor-fix

lazylinker_c: Make sure that the version number is flushed to disk
...@@ -127,7 +127,8 @@ except ImportError: ...@@ -127,7 +127,8 @@ except ImportError:
preargs=args) preargs=args)
# Save version into the __init__.py file. # Save version into the __init__.py file.
init_py = os.path.join(loc, '__init__.py') 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 # 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 # imported at the same time: we need to make sure we do not
# reload the now outdated __init__.pyc below. # reload the now outdated __init__.pyc below.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论