Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Prefer vendored qhull if sys-wide version can't be determined. #10074

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

Merged
merged 1 commit into from
Dec 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions setupext.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ def add_flags(self, ext, add_sources=True):
if self.found_external:
pkg_config.setup_extension(ext, 'libagg')
else:
ext.include_dirs.append('extern/agg24-svn/include')
ext.include_dirs.insert(0, 'extern/agg24-svn/include')
if add_sources:
agg_sources = [
'agg_bezier_arc.cpp',
Expand Down Expand Up @@ -1348,23 +1348,15 @@ def check(self):
'libqhull', 'libqhull/qhull_a.h', min_version='2015.2')
except CheckFailed as e:
self.__class__.found_pkgconfig = False
# Qhull may not be in the pkg-config system but may still be
# present on this system, so check if the header files can be
# found.
include_dirs = [
os.path.join(x, 'libqhull') for x in get_include_dirs()]
if has_include_file(include_dirs, 'qhull_a.h'):
return 'Using system Qhull (version unknown, no pkg-config info)'
else:
self.__class__.found_external = False
return str(e) + ' Using local copy.'
self.__class__.found_external = False
return str(e) + ' Using local copy.'

def add_flags(self, ext):
if self.found_external:
pkg_config.setup_extension(ext, 'qhull',
default_libraries=['qhull'])
else:
ext.include_dirs.append('extern')
ext.include_dirs.insert(0, 'extern')
ext.sources.extend(sorted(glob.glob('extern/libqhull/*.c')))


Expand All @@ -1380,7 +1372,7 @@ def get_extension(self):
]
ext = make_extension('matplotlib.ttconv', sources)
Numpy().add_flags(ext)
ext.include_dirs.append('extern')
ext.include_dirs.insert(0, 'extern')
return ext


Expand Down Expand Up @@ -1536,7 +1528,7 @@ def get_extension(self):
return ext

def add_flags(self, ext):
ext.include_dirs.extend(['src'])
ext.include_dirs.insert(0, 'src')
if sys.platform == 'win32':
# PSAPI library needed for finding Tcl / Tk at run time
ext.libraries.extend(['psapi'])
Expand Down