We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e55dc11 commit 354ce05Copy full SHA for 354ce05
1 file changed
setup.py
@@ -105,6 +105,14 @@ def build_extension(self, ext: CMakeExtension) -> None:
105
if "universal2" in self.plat_name:
106
cmake_args += ["-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64"]
107
108
+ # Set MACOSX_DEPLOYMENT_TARGET for macOS builds.
109
+ if (
110
+ self.plat_name.startswith("macosx-")
111
+ and "MACOSX_DEPLOYMENT_TARGET" not in os.environ
112
+ ):
113
+ target_version = self.plat_name.split("-")[1]
114
+ os.environ["MACOSX_DEPLOYMENT_TARGET"] = target_version
115
+
116
# Set CMAKE_BUILD_PARALLEL_LEVEL to control the parallel build level
117
# across all generators.
118
if "CMAKE_BUILD_PARALLEL_LEVEL" not in os.environ:
0 commit comments