8000 Strip out pkg-config machinery for agg and libqhull. · matplotlib/matplotlib@da73521 · GitHub
[go: up one dir, main page]

Skip to content

Commit da73521

Browse files
committed
Strip out pkg-config machinery for agg and libqhull.
We need a patched version of agg so the pkg-config check is useless; it will always fail. qhull doesn't actually ship valid pkg-config information so the check will likewise always fail. In both cases, just force the use of the vendored version.
1 parent f68063e commit da73521

File tree

1 file changed

+18
-48
lines changed

1 file changed

+18
-48
lines changed

setupext.py

Lines changed: 18 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -456,10 +456,6 @@ def _check_for_pkg_config(self, package, include_file, min_version=None,
456456
"pkg-config information for '%s' could not be found." %
457457
package)
458458

459-
if min_version == 'PATCH':
460-
raise CheckFailed(
461-
"Requires patches that have not been merged upstream.")
462-
463459
if min_version and version != & 10000 #39;unknown':
464460
if not is_min_version(version, min_version):
465461
raise CheckFailed(
@@ -893,33 +889,21 @@ def get_install_requires(self):
893889
class LibAgg(SetupPackage):
894890
name = 'libagg'
895891

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-
905892
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+
ext.include_dirs.insert(0, 'extern/agg24-svn/include')
894+
if add_sources:
895+
agg_sources = [
896+
'agg_bezier_arc.cpp',
897+
'agg_curves.cpp',
898+
'agg_image_filters.cpp',
899+
'agg_trans_affine.cpp',
900+
'agg_vcgen_contour.cpp',
901+
'agg_vcgen_dash.cpp',
902+
'agg_vcgen_stroke.cpp',
903+
'agg_vpgen_segmentator.cpp'
904+
]
905+
ext.sources.extend(os.path.join('extern', 'agg24-svn', 'src', x)
906+
for x in agg_sources)
923907

924908

925909
class FreeType(SetupPackage):
@@ -1202,25 +1186,11 @@ def get_extension(self):
12021186
class Qhull(SetupPackage):
12031187
name = "qhull"
12041188

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-
12151189
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')
1190+
ext.include_dirs.insert(0, 'extern')
1191+
ext.sources.extend(sorted(glob.glob('extern/libqhull/*.c')))
1192+
if sysconfig.get_config_var('LIBM') == '-lm':
1193+
ext.libraries.extend('m')
12241194

12251195

12261196
class TTConv(SetupPackage):

0 commit comments

Comments
 (0)
0