@@ -1033,7 +1033,7 @@ def add_flags(self, ext, add_sources=True):
1033
1033
if self .found_external :
1034
1034
pkg_config .setup_extension (ext , 'libagg' )
1035
1035
else :
1036
- ext .include_dirs .append ( 'extern/agg24-svn/include' )
1036
+ ext .include_dirs .insert ( 0 , 'extern/agg24-svn/include' )
1037
1037
if add_sources :
1038
1038
agg_sources = [
1039
1039
'agg_bezier_arc.cpp' ,
@@ -1348,23 +1348,15 @@ def check(self):
1348
1348
'libqhull' , 'libqhull/qhull_a.h' , min_version = '2015.2' )
1349
1349
except CheckFailed as e :
1350
1350
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.'
1361
1353
1362
1354
def add_flags (self , ext ):
1363
1355
if self .found_external :
1364
1356
pkg_config .setup_extension (ext , 'qhull' ,
1365
1357
default_libraries = ['qhull' ])
1366
1358
else :
1367
- ext .include_dirs .append ( 'extern' )
1359
+ ext .include_dirs .insert ( 0 , 'extern' )
1368
1360
ext .sources .extend (sorted (glob .glob ('extern/libqhull/*.c' )))
1369
1361
1370
1362
@@ -1380,7 +1372,7 @@ def get_extension(self):
1380
1372
]
1381
1373
ext = make_extension ('matplotlib.ttconv' , sources )
1382
1374
Numpy ().add_flags (ext )
1383
- ext .include_dirs .append ( 'extern' )
1375
+ ext .include_dirs .insert ( 0 , 'extern' )
1384
1376
return ext
1385
1377
1386
1378
@@ -1536,7 +1528,7 @@ def get_extension(self):
1536
1528
return ext
1537
1529
1538
1530
def add_flags (self , ext ):
1539
- ext .include_dirs .extend ([ 'src' ] )
1531
+ ext .include_dirs .insert ( 0 , 'src' )
1540
1532
if sys .platform == 'win32' :
1541
1533
# PSAPI library needed for finding Tcl / Tk at run time
1542
1534
ext .libraries .extend (['psapi' ])
0 commit comments