forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch Cython in grpc to use our COPTS (ray-project#6223)
- Loading branch information
Showing
4 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff --git bazel/cython_library.bzl bazel/cython_library.bzl | ||
index 48b41d74e8..6084734f59 100644 | ||
--- bazel/cython_library.bzl | ||
+++ bazel/cython_library.bzl | ||
@@ -7,7 +7,7 @@ | ||
# been written at cython/cython and tensorflow/tensorflow. We branch from | ||
# Tensorflow's version as it is more actively maintained and works for gRPC | ||
# Python's needs. | ||
-def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs): | ||
+def pyx_library(name, deps=[], copts=[], py_deps=[], srcs=[], **kwargs): | ||
"""Compiles a group of .pyx / .pxd / .py files. | ||
|
||
First runs Cython to create .cpp files for each input .pyx or .py + .pxd | ||
@@ -19,6 +19,7 @@ def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs): | ||
Args: | ||
name: Name for the rule. | ||
deps: C/C++ dependencies of the Cython (e.g. Numpy headers). | ||
+ copts: C/C++ compiler options for Cython | ||
py_deps: Pure Python dependencies of the final library. | ||
srcs: .py, .pyx, or .pxd files to either compile or pass through. | ||
**kwargs: Extra keyword arguments passed to the py_library. | ||
@@ -58,6 +59,7 @@ def pyx_library(name, deps=[], py_deps=[], srcs=[], **kwargs): | ||
native.cc_binary( | ||
name=shared_object_name, | ||
srcs=[stem + ".cpp"], | ||
+ copts=copts, | ||
deps=deps + ["@local_config_python//:python_headers"], | ||
linkshared=1, | ||
) | ||
-- |