From 08086d3195d465e8599fd8206f5ea8dc5fdee69c Mon Sep 17 00:00:00 2001 From: Nick Forrington Date: Mon, 18 Jun 2018 18:37:01 -0400 Subject: [PATCH] Search $CPATH for include directories --- setupext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setupext.py b/setupext.py index 6d363012eb4e..00ef3fe5a3dd 100644 --- a/setupext.py +++ b/setupext.py @@ -162,8 +162,10 @@ def get_include_dirs(): """ include_dirs = [os.path.join(d, 'include') for d in get_base_dirs()] if sys.platform != 'win32': - # gcc includes this dir automatically, so also look for headers in + # gcc includes these dirs automatically, so also look for headers in # these dirs + include_dirs.extend( + os.environ.get('CPATH', '').split(os.pathsep)) include_dirs.extend( os.environ.get('CPLUS_INCLUDE_PATH', '').split(os.pathsep)) return include_dirs