From e72367d3c4b426ce4ba7aa60c8126938860180dd Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Sat, 10 Oct 2020 16:39:53 -0700 Subject: [PATCH] Workaround for error due to case sensitive filenames under WSL --- tools/batools/assetstaging.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/batools/assetstaging.py b/tools/batools/assetstaging.py index f5f5f672..204e68d8 100755 --- a/tools/batools/assetstaging.py +++ b/tools/batools/assetstaging.py @@ -240,7 +240,11 @@ def _sync_windows_extras(cfg: Config) -> None: pyd_rules = "--exclude '*_d.pyd' --include '*.pyd'" for dirname in ('DLLs', 'Lib'): - _run(f'mkdir -p "{cfg.dst}/{dirname}"') + # EWW: seems windows python currently sets its path to ./lib but it + # comes with Lib. Windows is normally case-insensitive but this messes + # it up when running under WSL. Let's install it as lib for now. + dstdirname = 'lib' if dirname == 'Lib' else dirname + _run(f'mkdir -p "{cfg.dst}/{dstdirname}"') cmd = ('rsync --recursive --update --delete --delete-excluded ' ' --prune-empty-dirs' " --include '*.ico' --include '*.cat'" @@ -248,7 +252,7 @@ def _sync_windows_extras(cfg: Config) -> None: " --include '*.py' --include '*." + OPT_PYC_SUFFIX + "'" " --include '*/' --exclude '*' \"" + os.path.join(cfg.win_extras_src, dirname) + '/" ' - '"' + cfg.dst + '/' + dirname + '/"') + '"' + cfg.dst + '/' + dstdirname + '/"') _run(cmd) # Now sync the top level individual files that we want.