From bbb7de4e49df21c1dec51f76bac34fce8e11dc5a Mon Sep 17 00:00:00 2001 From: "pieths.dev@gmail.com" Date: Fri, 24 May 2019 12:43:13 -0700 Subject: [PATCH 1/2] Fix build issue on Windows when VS2019 is installed. Note: The -version option could not be added directly to the FOR command due to a command script parsing issue. --- build.cmd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.cmd b/build.cmd index 1f98b3c4..3756a536 100644 --- a/build.cmd +++ b/build.cmd @@ -195,8 +195,12 @@ echo "#################################" :: Setting native code build environment echo Setting native build environment ... set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +set vswhereOutputFile=vswhereOutput.tmp + if exist %_VSWHERE% ( - for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools + %_VSWHERE% -version "[15.0,16.0)" -latest -prerelease -property installationPath > %vswhereOutputFile% + for /f "tokens=* delims=" %%i in (%vswhereOutputFile%) do set _VSCOMNTOOLS=%%i\Common7\Tools + del %vswhereOutputFile% ) if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS% if not exist "%_VSCOMNTOOLS%" goto :MissingVersion From 03a275170f7e3d8c3604ae338bd46066ff99b7ff Mon Sep 17 00:00:00 2001 From: "pieths.dev@gmail.com" Date: Fri, 24 May 2019 13:32:40 -0700 Subject: [PATCH 2/2] Add missing arguments to fix build issue with latest version of autoflake. --- src/python/tools/code_fixer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python/tools/code_fixer.py b/src/python/tools/code_fixer.py index bc240b39..6b8dc5c8 100644 --- a/src/python/tools/code_fixer.py +++ b/src/python/tools/code_fixer.py @@ -415,4 +415,6 @@ def run_autoflake(filename): args.expand_star_imports = None args.remove_duplicate_keys = None args.remove_unused_variables = None + args.ignore_init_module_imports = None + args.check = None autoflake.fix_file(filename, args=args, standard_out=sys.stdout)