diff --git a/python/setup.py b/python/setup.py index 93de80376..0f49f6cd5 100644 --- a/python/setup.py +++ b/python/setup.py @@ -61,6 +61,11 @@ def build_extension(self, ext): cmd.append(f'--extra_toolchains=@local_config_cc//:cc-toolchain-{cpu}') except KeyError: pass + try: + ver = os.environ['MACOSX_DEPLOYMENT_TARGET'] + cmd.append(f'--macos_minimum_os={ver}') + except KeyError: + pass # Register the local Python toolchains with highest priority. self.generate_python_toolchains() cmd.append('--extra_toolchains=//python/toolchains:all')