Skip to content

Commit

Permalink
Trying to fix compilation error on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
shinaoka committed Jun 24, 2024
1 parent b79985f commit 95155fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ def build_extensions(self):

# clang on 14.4.1 fails to include C header files...
if platform.system() == 'Darwin':
os.environ['CPATH'] = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include:" + os.environ.get('CPATH', '')
sdk_path = (
"/Applications/Xcode.app/Contents/Developer/Platforms/"
"MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
)
current_cpath = os.environ.get('CPATH', '')
os.environ['CPATH'] = f"{sdk_path}:{current_cpath}"

# This has to be set to false because MacOS does not ship openmp
# by default.
Expand Down

0 comments on commit 95155fd

Please sign in to comment.