@@ -206,6 +206,9 @@ def remove(path, name):
206206 with open (os .path .join (dirname , setup_file ), 'w' , encoding = 'utf-8' ) as f :
207207 f .write (self ._setup_file_str .format (filename ))
208208
209+ if not complicating and os .path .isfile (os .path .join (dirname , "__init__.py" )):
210+ os .rename (os .path .join (dirname , "__init__.py" ), os .path .join (dirname , "___init__.py" ))
211+
209212 # Popen('python AutoCython_DataServerClient_Alice.py build_ext --inplace', stdout=PIPE, stderr=PIPE, cwd='build_test/test1\\')
210213 cython_popen = Popen (self ._Popen_cmd .format (setup_file ), stdout = PIPE , stderr = PIPE , cwd = dirname )
211214
@@ -215,6 +218,8 @@ def remove(path, name):
215218
216219 if wait :
217220 cython_popen .wait ()
221+ if not complicating and os .path .isfile (os .path .join (dirname , "___init__.py" )):
222+ os .rename (os .path .join (dirname , "___init__.py" ), os .path .join (dirname , "__init__.py" ))
218223
219224 if not complicating and cython_popen .wait () != 0 :
220225 # 错误是输出
@@ -343,7 +348,7 @@ def __init__(self):
343348 self .file_path = ''
344349 self .a_file_flag = False
345350
346- self .version = 'AutoCython V1.2.5 '
351+ self .version = 'AutoCython V1.2.6 '
347352 # 像这样写格式好看一点
348353 self .help_info = (
349354 "Usage: AutoCython [options] ...\n " +
@@ -414,4 +419,4 @@ def geto(self) -> (str, list, str, list):
414419 """ CMD """
415420 ac = AutoCython (* AC_getopt_argv ().geto ())
416421
417- ac .compile ()
422+ ac .compile ()
0 commit comments