File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ def main():
25
25
output_path = sys .argv [1 ]
26
26
sdk = get_sdk_path ()
27
27
cpp_modulemap = os .path .join (sdk , "usr/include/c++/v1/module.modulemap" )
28
+ if not os .path .exists (cpp_modulemap ):
29
+ # Try again if we are running a conda build. conda-forge ships the MacOS SDK stripped of libc++.
30
+ # Instead, the standard libraries are shipped as a separate package which must be declared as a build
31
+ # dependency and thus ends up in the $BUILD_PREFIX path. For explanation, see
32
+ # https://conda-forge.zulipchat.com/#narrow/channel/516932-compilers/topic/Organisation.20of.20libc.2B.2B.20and.20SDKs.20on.20MacOS
33
+ if (os .environ .get ("CONDA_BUILD" , "0" ) == "1" ) and (os .environ .get ("BUILD_PREFIX" , None ) is not None ):
34
+ cpp_modulemap = os .path .join (os .environ ["BUILD_PREFIX" ], "include/c++/v1/module.modulemap" )
28
35
29
36
if not os .path .exists (cpp_modulemap ):
30
37
raise FileNotFoundError (f"Cannot find libc++ modulemap at { cpp_modulemap } " )
You can’t perform that action at this time.
0 commit comments