Skip to content

Commit

Permalink
Merge pull request #5578 from mdboom/c-include-path
Browse files Browse the repository at this point in the history
Fix #5576: Handle CPLUS_INCLUDE_PATH
  • Loading branch information
tacaswell committed Nov 30, 2015
1 parent aceb626 commit a385d33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setupext.py
Expand Up @@ -163,7 +163,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 @@ -469,7 +472,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

0 comments on commit a385d33

Please sign in to comment.