Skip to content

Commit 4299756

Browse files
authored
Merge pull request #11457 from NickRF/patch-1
Search $CPATH for include directories
2 parents af7a74b + 08086d3 commit 4299756

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setupext.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,10 @@ def get_include_dirs():
162162
"""
163163
include_dirs = [os.path.join(d, 'include') for d in get_base_dirs()]
164164
if sys.platform != 'win32':
165-
# gcc includes this dir automatically, so also look for headers in
165+
# gcc includes these dirs automatically, so also look for headers in
166166
# these dirs
167+
include_dirs.extend(
168+
os.environ.get('CPATH', '').split(os.pathsep))
167169
include_dirs.extend(
168170
os.environ.get('CPLUS_INCLUDE_PATH', '').split(os.pathsep))
169171
return include_dirs

0 commit comments

Comments
 (0)