@@ -456,10 +456,6 @@ def _check_for_pkg_config(self, package, include_file, min_version=None,
456
456
"pkg-config information for '%s' could not be found." %
457
457
package )
458
458
459
- if min_version == 'PATCH' :
460
- raise CheckFailed (
461
- "Requires patches that have not been merged upstream." )
462
-
463
459
if min_version and version != 'unknown' :
464
460
if not is_min_version (version , min_version ):
465
461
raise CheckFailed (
@@ -893,33 +889,23 @@ def get_install_requires(self):
893
889
class LibAgg (SetupPackage ):
894
890
name = 'libagg'
895
891
896
- def check (self ):
897
- self .__class__ .found_external = True
898
- try :
899
- return self ._check_for_pkg_config (
900
- 'libagg' , 'agg2/agg_basics.h' , min_version = 'PATCH' )
901
- except CheckFailed as e :
902
- self .__class__ .found_external = False
903
- return str (e ) + ' Using local copy.'
904
-
905
892
def add_flags (self , ext , add_sources = True ):
906
- if self .found_external :
907
- pkg_config .setup_extension (ext , 'libagg' )
908
- else :
909
- ext .include_dirs .insert (0 , 'extern/agg24-svn/include' )
910
- if add_sources :
911
- agg_sources = [
912
- 'agg_bezier_arc.cpp' ,
913
- 'agg_curves.cpp' ,
914
- 'agg_image_filters.cpp' ,
915
- 'agg_trans_affine.cpp' ,
916
- 'agg_vcgen_contour.cpp' ,
917
- 'agg_vcgen_dash.cpp' ,
918
- 'agg_vcgen_stroke.cpp' ,
919
- 'agg_vpgen_segmentator.cpp'
920
- ]
921
- ext .sources .extend (
922
- os .path .join ('extern' , 'agg24-svn' , 'src' , x ) for x in agg_sources )
893
+ # We need a patched Agg not available elsewhere, so always use the
894
+ # vendored version.
895
+ ext .include_dirs .insert (0 , 'extern/agg24-svn/include' )
896
+ if add_sources :
897
+ agg_sources = [
898
+ 'agg_bezier_arc.cpp' ,
899
+ 'agg_curves.cpp' ,
900
+ 'agg_image_filters.cpp' ,
901
+ 'agg_trans_affine.cpp' ,
902
+ 'agg_vcgen_contour.cpp' ,
903
+ 'agg_vcgen_dash.cpp' ,
904
+ 'agg_vcgen_stroke.cpp' ,
905
+ 'agg_vpgen_segmentator.cpp'
906
+ ]
907
+ ext .sources .extend (os .path .join ('extern' , 'agg24-svn' , 'src' , x )
908
+ for x in agg_sources )
923
909
924
910
925
911
class FreeType (SetupPackage ):
@@ -1202,25 +1188,14 @@ def get_extension(self):
1202
1188
class Qhull (SetupPackage ):
1203
1189
name = "qhull"
1204
1190
1205
- def check (self ):
1206
- self .__class__ .found_external = True
1207
- try :
1208
- return self ._check_for_pkg_config (
1209
- 'libqhull' , 'libqhull/qhull_a.h' , min_version = '2015.2' )
1210
- except CheckFailed as e :
1211
- self .__class__ .found_pkgconfig = False
1212
- self .__class__ .found_external = False
1213
- return str (e ) + ' Using local copy.'
1214
-
1215
1191
def add_flags (self , ext ):
1216
- if self .found_external :
1217
- pkg_config .setup_extension (ext , 'qhull' ,
1218
- default_libraries = ['qhull' ])
1219
- else :
1220
- ext .include_dirs .insert (0 , 'extern' )
1221
- ext .sources .extend (sorted (glob .glob ('extern/libqhull/*.c' )))
1222
- if sysconfig .get_config_var ('LIBM' ) == '-lm' :
1223
- ext .libraries .extend ('m' )
1192
+ # Qhull doesn't distribute pkg-config info, so we have no way of
1193
+ # knowing whether a system install is recent enough. Thus, always use
1194
+ # the vendored version.
1195
+ ext .include_dirs .insert (0 , 'extern' )
1196
+ ext .sources .extend (sorted (glob .glob ('extern/libqhull/*.c' )))
1197
+ if sysconfig .get_config_var ('LIBM' ) == '-lm' :
1198
+ ext .libraries .extend ('m' )
1224
1199
1225
1200
1226
1201
class TTConv (SetupPackage ):
0 commit comments