@@ -435,10 +435,6 @@ def _check_for_pkg_config(self, package, include_file, min_version=None,
435
435
"pkg-config information for '%s' could not be found." %
436
436
package )
437
437
438
- if min_version == 'PATCH' :
439
- raise CheckFailed (
440
- "Requires patches that have not been merged upstream." )
441
-
442
438
if min_version and version != 'unknown' :
443
439
if not is_min_version (version , min_version ):
444
440
raise CheckFailed (
@@ -799,33 +795,23 @@ def get_install_requires(self):
799
795
class LibAgg (SetupPackage ):
800
796
name = 'libagg'
801
797
802
- def check (self ):
803
- self .__class__ .found_external = True
804
- try :
805
- return self ._check_for_pkg_config (
806
- 'libagg' , 'agg2/agg_basics.h' , min_version = 'PATCH' )
807
- except CheckFailed as e :
808
- self .__class__ .found_external = False
809
- return str (e ) + ' Using local copy.'
810
-
811
798
def add_flags (self , ext , add_sources = True ):
812
- if self .found_external :
813
- pkg_config .setup_extension (ext , 'libagg' )
814
- else :
815
- ext .include_dirs .insert (0 , 'extern/agg24-svn/include' )
816
- if add_sources :
817
- agg_sources = [
818
- 'agg_bezier_arc.cpp' ,
819
- 'agg_curves.cpp' ,
820
- 'agg_image_filters.cpp' ,
821
- 'agg_trans_affine.cpp' ,
822
- 'agg_vcgen_contour.cpp' ,
823
- 'agg_vcgen_dash.cpp' ,
824
- 'agg_vcgen_stroke.cpp' ,
825
- 'agg_vpgen_segmentator.cpp'
826
- ]
827
- ext .sources .extend (
828
- os .path .join ('extern' , 'agg24-svn' , 'src' , x ) for x in agg_sources )
799
+ # We need a patched Agg not available elsewhere, so always use the
800
+ # vendored version.
801
+ ext .include_dirs .insert (0 , 'extern/agg24-svn/include' )
802
+ if add_sources :
803
+ agg_sources = [
804
+ 'agg_bezier_arc.cpp' ,
805
+ 'agg_curves.cpp' ,
806
+ 'agg_image_filters.cpp' ,
807
+ 'agg_trans_affine.cpp' ,
808
+ 'agg_vcgen_contour.cpp' ,
809
+ 'agg_vcgen_dash.cpp' ,
810
+ 'agg_vcgen_stroke.cpp' ,
811
+ 'agg_vpgen_segmentator.cpp'
812
+ ]
813
+ ext .sources .extend (os .path .join ('extern' , 'agg24-svn' , 'src' , x )
814
+ for x in agg_sources )
829
815
830
816
831
817
class FreeType (SetupPackage ):
@@ -1108,25 +1094,14 @@ def get_extension(self):
1108
1094
class Qhull (SetupPackage ):
1109
1095
name = "qhull"
1110
1096
1111
- def check (self ):
1112
- self .__class__ .found_external = True
1113
- try :
1114
- return self ._check_for_pkg_config (
1115
- 'libqhull' , 'libqhull/qhull_a.h' , min_version = '2015.2' )
1116
- except CheckFailed as e :
1117
- self .__class__ .found_pkgconfig = False
1118
- self .__class__ .found_external = False
1119
- return str (e ) + ' Using local copy.'
1120
-
1121
1097
def add_flags (self , ext ):
1122
- if self .found_external :
1123
- pkg_config .setup_extension (ext , 'qhull' ,
1124
- default_libraries = ['qhull' ])
1125
- else :
1126
- ext .include_dirs .insert (0 , 'extern' )
1127
- ext .sources .extend (sorted (glob .glob ('extern/libqhull/*.c' )))
1128
- if sysconfig .get_config_var ('LIBM' ) == '-lm' :
1129
- ext .libraries .extend ('m' )
1098
+ # Qhull doesn't distribute pkg-config info, so we have no way of
1099
+ # knowing whether a system install is recent enough. Thus, always use
1100
+ # the vendored version.
1101
+ ext .include_dirs .insert (0 , 'extern' )
1102
+ ext .sources .extend (sorted (glob .glob ('extern/libqhull/*.c' )))
1103
+ if sysconfig .get_config_var ('LIBM' ) == '-lm' :
1104
+ ext .libraries .extend ('m' )
1130
1105
1131
1106
1132
1107
class TTConv (SetupPackage ):
0 commit comments