Skip to content

Commit

Permalink
update grpc to 1.43 (ray-project#21866)
Browse files Browse the repository at this point in the history
add patch for newer setuptools, can be removed once grpc 1.44 is release

Why are these changes needed?
With grpc updated to 1.43, one of the patches is not needed.

Patch needed when building locally for newer setuptools version. See grpc/grpc#28392 for more details.
Also needed as a prereq to ray-project#21221
  • Loading branch information
acxz authored Feb 15, 2022
1 parent 59d9e20 commit ae60682
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 15 deletions.
8 changes: 4 additions & 4 deletions bazel/ray_deps_setup.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,13 @@ def ray_deps_setup():
auto_http_archive(
name = "com_github_grpc_grpc",
# NOTE: If you update this, also update @boringssl's hash.
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.42.0.tar.gz",
sha256 = "b2f2620c762427bfeeef96a68c1924319f384e877bc0e084487601e4cc6e434c",
url = "https://github.com/grpc/grpc/archive/refs/tags/v1.43.2.tar.gz",
sha256 = "b74ce7d26fe187970d1d8e2c06a5d3391122f7bc1fdce569aff5e435fb8fe780",
patches = [
"@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch",
# Delete after upgrading from 1.42.0
"@com_github_ray_project_ray//thirdparty/patches:grpc-default-initialization.patch",
"@com_github_ray_project_ray//thirdparty/patches:grpc-python.patch",
# Delete after upgrading from 1.44.0
"@com_github_ray_project_ray//thirdparty/patches:grpc-remove-distutils.patch",
],
)

Expand Down
11 changes: 0 additions & 11 deletions thirdparty/patches/grpc-default-initialization.patch

This file was deleted.

32 changes: 32 additions & 0 deletions thirdparty/patches/grpc-remove-distutils.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff --git third_party/py/python_configure.bzl third_party/py/python_configure.bzl
--- third_party/py/python_configure.bzl
+++ third_party/py/python_configure.bzl
@@ -199,8 +199,8 @@ def _get_python_lib(repository_ctx, python_bin, lib_path_key):
" python_paths = os.getenv('PYTHONPATH').split(':')\n" + "try:\n" +
" library_paths = site.getsitepackages()\n" +
"except AttributeError:\n" +
- " from distutils.sysconfig import get_python_lib\n" +
- " library_paths = [get_python_lib()]\n" +
+ " import sysconfig\n" +
+ " library_paths = [sysconfig.get_path('purelib')]\n" +
"all_paths = set(python_paths + library_paths)\n" + "paths = []\n" +
"for path in all_paths:\n" + " if os.path.isdir(path):\n" +
" paths.append(path)\n" + "if len(paths) >=1:\n" +
@@ -237,14 +237,13 @@ def _get_python_include(repository_ctx, python_bin):
python_bin,
"-c",
"from __future__ import print_function;" +
- "from distutils import sysconfig;" +
- "print(sysconfig.get_python_inc())",
+ "import sysconfig;" +
+ "print(sysconfig.get_path('include'))",
],
error_msg = "Problem getting python include path for {}.".format(python_bin),
error_details = (
"Is the Python binary path set up right? " + "(See ./configure or " +
- python_bin + ".) " + "Is distutils installed? " +
- _HEADERS_HELP
+ python_bin + ".) " + _HEADERS_HELP
),
)
include_path = result.stdout.splitlines()[0]

0 comments on commit ae60682

Please sign in to comment.