Currently download_test_data in build.py supports only the standalone version of 7-Zip by looking for 7za.exe. Add support for the standard version which has 7z.exe. (#1030)

This commit is contained in:
Scott McKay 2019-05-16 02:38:38 +10:00 committed by GitHub
parent 3ac4826268
commit 9029c496b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,8 +270,10 @@ def download_test_data(build_dir, src_url, expected_md5, azure_sas_key):
shutil.rmtree(models_dir)
if shutil.which('unzip'):
run_subprocess(['unzip','-qd', models_dir, local_zip_file])
elif shutil.which('7za'):
run_subprocess(['7za','x', local_zip_file, '-y', '-o' + models_dir])
elif shutil.which('7z'): # 7-Zip
run_subprocess(['7z','x', local_zip_file, '-y', '-o' + models_dir])
elif shutil.which('7za'): # 7-Zip standalone
run_subprocess(['7za', 'x', local_zip_file, '-y', '-o' + models_dir])
else:
#TODO: use python for unzip
log.error("No unzip tool for use")