@@ -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