 +            target = os.path.abspath(os.path.join(os.path.dirname(path), target))
 +            print('Setting {} -> {}'.format(link, target))
 +            subprocess.check_call('MKLINK /J "{}" "{}"'.format(os.path.basename(link), target), shell=True, cwd=os.path.dirname(path))
++
++if is_native_windows_or_msys():
++    replace_symlinks_with_junctions()
  
  def build(build_python, build_java):
      if tuple(sys.version_info[:2]) not in SUPPORTED_PYTHONS:
-@@ -243,6 +272,7 @@ def build(build_python, build_java):
+@@ -243,6 +275,7 @@ def build(build_python, build_java):
      bazel_env = dict(os.environ, PYTHON3_BIN_PATH=sys.executable)
  
      if is_native_windows_or_msys():

From 0c50de7de4a72586b906a4bafc48bea3e4450e2b Mon Sep 17 00:00:00 2001
From: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
Date: Fri, 20 Nov 2020 15:32:19 +0300
Subject: [PATCH 10/10] Convert symlinks to junctions on Windows before


Signed-off-by: Vasilij Litvinov <vasilij.n.litvinov@intel.com>
---
 python/setup.py | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/python/setup.py b/python/setup.py
index 4648bda0b..a74223881 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -225,6 +225,38 @@ def download_pickle5(pickle5_dir):
             finally:
                 wzf.close()
 
