8000 Merge pull request #10074 from anntzer/prefer-internal-qhull · matplotlib/matplotlib@a456bd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit a456bd1

Browse files
authored
Merge pull request #10074 from anntzer/prefer-internal-qhull
Prefer vendored qhull if sys-wide version can't be determined.
2 parents 207b9a7 + 927c281 commit a456bd1

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

setupext.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ def add_flags(self, ext, add_sources=True):
10331033
if self.found_external:
10341034
pkg_config.setup_extension(ext, 'libagg')
10351035
else:
1036-
ext.include_dirs.append('extern/agg24-svn/include')
1036+
ext.include_dirs.insert(0, 'extern/agg24-svn/include')
10371037
if add_sources:
10381038
agg_sources = [
10391039
'agg_bezier_arc.cpp',
@@ -1348,23 +1348,15 @@ def check(self):
13481348
'libqhull', 'libqhull/qhull_a.h', min_version='2015.2')
13491349
except CheckFailed as e:
13501350
self.__class__.found_pkgconfig = False
1351-
# Qhull may not be in the pkg-config system but may still be
1352-
# present on this system, so check if the header files can be
1353-
# found.
1354-
include_dirs = [
1355-
os.path.join(x, 'libqhull') for x in get_include_dirs()]
1356-
if has_include_file(include_dirs, 'qhull_a.h'):
1357-
return 'Using system Qhull (version unknown, no pkg-config info)'
1358-
else:
1359-
self.__class__.found_external = False
1360-
return str(e) + ' Using local copy.'
1351+
self.__class__.found_external = False
1352+
return str(e) + ' Using local copy.'
13611353

13621354
def add_flags(self, ext):
13631355
if self.found_external:
13641356
pkg_config.setup_extension(ext, 'qhull',
13651357
default_libraries=['qhull'])
13661358
else:
1367-
ext.include_dirs.append('extern')
1359+
ext.include_dirs.insert(0, 'extern')
13681360
ext.sources.extend(sorted(glob.glob('extern/libqhull/*.c')))
13691361

13701362

@@ -1380,7 +1372,7 @@ def get_extension(self):
13801372
]
13811373
ext = make_extension('matplotlib.ttconv', sources)
13821374
Numpy().add_flags(ext)
1383-
ext.include_dirs.append('extern')
1375+
ext.include_dirs.insert(0, 'extern')
13841376
return ext
13851377

13861378

@@ -1536,7 +1528,7 @@ def get_extension(self):
15361528
return ext
15371529

15381530
def add_flags(self, ext):
1539-
ext.include_dirs.extend(['src'])
1531+
ext.include_dirs.insert(0, 'src')
15401532
if sys.platform == 'win32':
15411533
# PSAPI library needed for finding Tcl / Tk at run time
15421534
ext.libraries.extend(['psapi'])

0 commit comments

Comments
 (0)
0