Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5576: Handle CPLUS_INCLUDE_PATH #5578

Merged
merged 1 commit into from Nov 30, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions setupext.py
Expand Up @@ -142,7 +142,10 @@ def get_include_dirs():
"""
Returns a list of standard include directories on this platform.
"""
return [os.path.join(d, 'include') for d in get_base_dirs()]
include_dirs = [os.path.join(d, 'include') for d in get_base_dirs()]
include_dirs.extend(
os.environ.get('CPLUS_INCLUDE_PATH', '').split(os.pathsep))
return include_dirs


def is_min_version(found, minversion):
Expand Down Expand Up @@ -463,7 +466,8 @@ def _check_for_pkg_config(self, package, include_file, min_version=None,
ext = make_extension('test', [])
pkg_config.setup_extension(ext, package)

check_include_file(ext.include_dirs, include_file, package)
check_include_file(
ext.include_dirs + get_include_dirs(), include_file, package)

return 'version %s' % version

Expand Down