Fix Windows 2016 build. (#5902)

This commit is contained in:
Jiaming Yuan
2020-07-18 05:50:17 +08:00
committed by GitHub
parent 71b0528a2f
commit 6c0c87216f
3 changed files with 10 additions and 8 deletions

View File

@@ -153,6 +153,8 @@ class BuildExt(build_ext.build_ext): # pylint: disable=too-many-ancestors
'%s is used for building Windows distribution.', vs)
break
except subprocess.CalledProcessError:
shutil.rmtree(build_dir)
os.mkdir(build_dir)
continue
else:
gen = '-GNinja' if build_tool == 'ninja' else '-GUnix Makefiles'