Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with System OpenSSL on Mac OS arm64 #31096

Merged
merged 3 commits into from Oct 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 13 additions & 2 deletions setup.py
Expand Up @@ -133,11 +133,22 @@ def _env_bool_value(env_name, default):
# present, then it will still attempt to use Cython.
BUILD_WITH_CYTHON = _env_bool_value('GRPC_PYTHON_BUILD_WITH_CYTHON', 'False')

# Currently, boringssl does not support macOS arm64, so we try to use the system
# installation of openssl to build gRPC locally by default.
if "darwin" in sys.platform and "arm64" == platform.machine().lower():
sys.stderr.write(
"Boringssl currently does not support macOS arm64, so we'll try to use the system installation "
"of 'openssl' to build by default, make sure you have 'openssl' installed in this case\n"
)
BUILD_WITH_SYSTEM_OPENSSL_DEFAULT_ENV = "True"
else:
BUILD_WITH_SYSTEM_OPENSSL_DEFAULT_ENV = "False"

# Export this variable to use the system installation of openssl. You need to
# have the header files installed (in /usr/include/openssl) and during
# runtime, the shared library must be installed
BUILD_WITH_SYSTEM_OPENSSL = _env_bool_value('GRPC_PYTHON_BUILD_SYSTEM_OPENSSL',
'False')
BUILD_WITH_SYSTEM_OPENSSL = _env_bool_value(
'GRPC_PYTHON_BUILD_SYSTEM_OPENSSL', BUILD_WITH_SYSTEM_OPENSSL_DEFAULT_ENV)

# Export this variable to use the system installation of zlib. You need to
# have the header files installed (in /usr/include/) and during
Expand Down