浏览代码

Update compileall.py

blueloveTH 1 月之前
父节点
当前提交
3c379402c8
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      compileall.py

+ 2 - 0
compileall.py

@@ -16,6 +16,8 @@ def do_compile(src_path, dst_path):
     assert os.system(cmd) == 0
 
 if os.path.isfile(source_dir):
+    if output_dir.endswith('.py'):
+        output_dir += 'c'
     do_compile(source_dir, output_dir)
     exit(0)