diff --git a/recipes/ray-packages/patches/0009-Convert-symlinks-to-junctions-on-Windows-before-buil.patch b/recipes/ray-packages/patches/0009-Convert-symlinks-to-junctions-on-Windows-before-buil.patch index b68edb60815de..fa56674cedac1 100644 --- a/recipes/ray-packages/patches/0009-Convert-symlinks-to-junctions-on-Windows-before-buil.patch +++ b/recipes/ray-packages/patches/0009-Convert-symlinks-to-junctions-on-Windows-before-buil.patch @@ -1,4 +1,4 @@ -From fdeefcf7374a5ff1dd3026a607b08efeb0b69b9b Mon Sep 17 00:00:00 2001 +From d2c6fcdc5c5dd2b43c62309b0ab4a02b2cffb786 Mon Sep 17 00:00:00 2001 From: Vasilij Litvinov Date: Fri, 20 Nov 2020 15:32:19 +0300 Subject: [PATCH 09/12] Convert symlinks to junctions on Windows before @@ -6,14 +6,14 @@ Subject: [PATCH 09/12] Convert symlinks to junctions on Windows before Signed-off-by: Vasilij Litvinov --- - python/setup.py | 36 ++++++++++++++++++++++++++++++++++++ - 1 file changed, 36 insertions(+) + python/setup.py | 40 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 40 insertions(+) diff --git a/python/setup.py b/python/setup.py -index 024657039..7a225f72d 100644 +index 024657039..1e8ae41f7 100644 --- a/python/setup.py +++ b/python/setup.py -@@ -225,6 +225,41 @@ def download_pickle5(pickle5_dir): +@@ -225,6 +225,45 @@ def download_pickle5(pickle5_dir): finally: wzf.close() @@ -26,11 +26,8 @@ index 024657039..7a225f72d 100644 + root_dir = os.path.dirname(__file__) + for link, default in _LINKS.items(): + path = os.path.join(root_dir, link) -+ if os.path.exists(os.path.join(path, '__init__.py')): -+ print('"{}" does not need workarounds, skipping'.format(link)) -+ continue + try: -+ out = subprocess.check_output('DIR /A:L /B', shell=True, cwd=os.path.dirname(path)) ++ out = subprocess.check_output('DIR /A:LD /B', shell=True, cwd=os.path.dirname(path)) + except subprocess.CalledProcessError: + out = b'' + if os.path.basename(path) in out.decode('utf8').splitlines(): @@ -43,7 +40,14 @@ index 024657039..7a225f72d 100644 + os.unlink(path) + elif os.path.isdir(path): + target = default -+ os.rmdir(path) ++ try: ++ # unlink() works on links as well as on regular files, ++ # and links to directories are considered directories now ++ os.unlink(path) ++ except OSError as err: ++ if err.errno != errno.EIO: ++ raise ++ os.rmdir(path) + else: + raise ValueError('Unexpected type of entry: "{}"'.format(path)) + target = os.path.abspath(os.path.join(os.path.dirname(path), target)) @@ -55,7 +59,7 @@ index 024657039..7a225f72d 100644 def build(build_python, build_java): if tuple(sys.version_info[:2]) not in SUPPORTED_PYTHONS: -@@ -243,6 +278,7 @@ def build(build_python, build_java): +@@ -243,6 +282,7 @@ def build(build_python, build_java): bazel_env = dict(os.environ, PYTHON3_BIN_PATH=sys.executable) if is_native_windows_or_msys(): diff --git a/recipes/ray-packages/patches/0010-Add-workaround-for-os.path.isdir-on-Windows.patch b/recipes/ray-packages/patches/0010-Add-workaround-for-os.path.isdir-on-Windows.patch index 09770a9780239..f9d8029d3e435 100644 --- a/recipes/ray-packages/patches/0010-Add-workaround-for-os.path.isdir-on-Windows.patch +++ b/recipes/ray-packages/patches/0010-Add-workaround-for-os.path.isdir-on-Windows.patch @@ -1,15 +1,15 @@ -From 3f509f32d4c3014486e98aa03405335d611bc8f0 Mon Sep 17 00:00:00 2001 +From a198dddb9786a10c2eb2470f68bfe50a21d1565b Mon Sep 17 00:00:00 2001 From: Vasilij Litvinov Date: Mon, 23 Nov 2020 13:14:24 +0300 Subject: [PATCH 10/12] Add workaround for os.path.isdir on Windows Signed-off-by: Vasilij Litvinov --- - python/setup.py | 20 +++++++++++++++++++- - 1 file changed, 19 insertions(+), 1 deletion(-) + python/setup.py | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) diff --git a/python/setup.py b/python/setup.py -index 7a225f72d..862e6ae94 100644 +index 1e8ae41f7..3ad34870a 100644 --- a/python/setup.py +++ b/python/setup.py @@ -225,6 +225,24 @@ def download_pickle5(pickle5_dir): @@ -37,15 +37,7 @@ index 7a225f72d..862e6ae94 100644 def replace_symlinks_with_junctions(): _LINKS = { r'ray\new_dashboard': '../../dashboard', -@@ -235,7 +253,6 @@ def replace_symlinks_with_junctions(): - for link, default in _LINKS.items(): - path = os.path.join(root_dir, link) - if os.path.exists(os.path.join(path, '__init__.py')): -- print('"{}" does not need workarounds, skipping'.format(link)) - continue - try: - out = subprocess.check_output('DIR /A:L /B', shell=True, cwd=os.path.dirname(path)) -@@ -259,6 +276,7 @@ def replace_symlinks_with_junctions(): +@@ -263,6 +281,7 @@ def replace_symlinks_with_junctions(): subprocess.check_call('MKLINK /J "{}" "{}"'.format(os.path.basename(link), target), shell=True, cwd=os.path.dirname(path)) if is_native_windows_or_msys(): diff --git a/recipes/ray-packages/patches/0011-Include-process.h-for-getpid-explicitly-on-Windows.patch b/recipes/ray-packages/patches/0011-Include-process.h-for-getpid-explicitly-on-Windows.patch index 6efb37dc941b6..823a29598b144 100644 --- a/recipes/ray-packages/patches/0011-Include-process.h-for-getpid-explicitly-on-Windows.patch +++ b/recipes/ray-packages/patches/0011-Include-process.h-for-getpid-explicitly-on-Windows.patch @@ -1,4 +1,4 @@ -From 58db1bb52d2fa598d1be413ab0324a1c6cfa4960 Mon Sep 17 00:00:00 2001 +From 479036d8d6e4ab66599f970e2743c4f6e04768c5 Mon Sep 17 00:00:00 2001 From: Vasilij Litvinov Date: Tue, 24 Nov 2020 00:20:34 +0300 Subject: [PATCH 11/12] Include for getpid() explicitly on Windows diff --git a/recipes/ray-packages/patches/0012-Empty-install-requirements-installed-by-conda-build.patch b/recipes/ray-packages/patches/0012-Empty-install-requirements-installed-by-conda-build.patch index 404bd62d26f9c..a5917814f85c3 100644 --- a/recipes/ray-packages/patches/0012-Empty-install-requirements-installed-by-conda-build.patch +++ b/recipes/ray-packages/patches/0012-Empty-install-requirements-installed-by-conda-build.patch @@ -1,4 +1,4 @@ -From 3d53c6d31d05f1c098a99f0ff29f9dcb3d70c7b1 Mon Sep 17 00:00:00 2001 +From f7b0ac4a4e8decb49ddc54ba8666d986091d2829 Mon Sep 17 00:00:00 2001 From: Vasily Litvinov Date: Fri, 4 Dec 2020 12:49:34 +0300 Subject: [PATCH 12/12] Empty install requirements - installed by conda build @@ -9,7 +9,7 @@ Signed-off-by: Vasily Litvinov 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/python/setup.py b/python/setup.py -index 862e6ae94..8a63bfac2 100644 +index 3ad34870a..bd7762372 100644 --- a/python/setup.py +++ b/python/setup.py @@ -128,31 +128,7 @@ extras["all"] = list(set(chain.from_iterable(extras.values()))) @@ -45,7 +45,7 @@ index 862e6ae94..8a63bfac2 100644 def is_native_windows_or_msys(): -@@ -517,7 +493,7 @@ setuptools.setup( +@@ -522,7 +498,7 @@ setuptools.setup( # The BinaryDistribution argument triggers build_ext. distclass=BinaryDistribution, install_requires=install_requires,