Skip to content

Commit 87d25ff

Browse files
committed
Merge pull request #2282 from mdboom/pycxx-fix-check
Extend search path for PyCXX headers
2 parents 71ed192 + 6b827cb commit 87d25ff

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

setupext.py

+6-11
Original file line numberDiff line numberDiff line change
@@ -699,17 +699,12 @@ def check(self):
699699
return self._check_for_pkg_config(
700700
'PyCXX', 'CXX/Extensions.hxx', min_version='6.2.4')
701701
except CheckFailed as e:
702-
# Since there is no .pc file for PyCXX upstream, many
703-
# distros don't package it either. We don't necessarily
704-
# need to fall back to a local build in that scenario if
705-
# the header files can be found.
706-
base_include_dirs = [
707-
os.path.join(x, 'include') for x in get_base_dirs()]
708-
if has_include_file(base_include_dirs, 'CXX/Extensions.hxx'):
709-
return 'Using system CXX (version unknown, no pkg-config info)'
710-
else:
711-
self.__class__.found_external = False
712-
return str(e) + ' Using local copy.'
702+
# It's ok to just proceed here, since the `import CXX`
703+
# worked above, and PyCXX (at least upstream) ensures that
704+
# its header files are on the default distutils include
705+
# path (either in a standard C place such as /usr/include,
706+
# or in /usr/include/pythonX.Y.
707+
return 'Using system CXX (version unknown, no pkg-config info)'
713708

714709
def add_flags(self, ext):
715710
if self.found_external and not 'sdist' in sys.argv:

0 commit comments

Comments
 (0)