提交 a2a6d7cd authored 作者: Jeremiah Lowin's avatar Jeremiah Lowin

improved comment explaining why these lines are here

上级 090d80f9
...@@ -57,11 +57,12 @@ def compile_cutils(): ...@@ -57,11 +57,12 @@ def compile_cutils():
preargs=args) preargs=args)
try: try:
# Compiledir ust be at the beginning of the path to ensure no conflict with # See gh issue #728 for why these lines are here. Summary: compiledir
# other project that would use the same module name. An __init__ file must # must be at the beginning of the path to avoid conflicts with any other
# also exist. Note that compile_str also creates an __init__ but if another # cutils_ext modules that might exist. An __init__.py file must be created
# cutils_ext exists somewhere on the path it will be imported without # for the same reason. Note that these 5 lines may seem redundant (they are
# calling compile_str. # repeated in compile_str()) but if another cutils_ext does exist then it
# will be imported and compile_str won't get called at all.
sys.path.insert(0, config.compiledir) sys.path.insert(0, config.compiledir)
location = os.path.join(config.compiledir, 'cutils_ext') location = os.path.join(config.compiledir, 'cutils_ext')
if not os.path.exists(location): if not os.path.exists(location):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论