File tree Expand file tree Collapse file tree 1 file changed +15
-9
lines changed
Expand file tree Collapse file tree 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -467,6 +467,21 @@ def get_config(self):
467467 self .optional = False
468468 return self .install
469469
470+ def check (self ):
471+ """
472+ This method should be called using super() even when overriding this
473+ method in a base class to check for a opt-out in the config file.
474+ """
475+ if self .get_config () is True :
476+ return "installing"
477+ else :
478+ # Some backend extensions (e.g. Agg) need to be built for certain
479+ # other GUI backends (e.g. TkAgg) even when manually disabled
480+ if self .force is True :
481+ return "installation is forced (overriding configuration)"
482+ else :
483+ raise CheckFailed ("skipping due to configuration" )
484+
470485
471486class Platform (SetupPackage ):
472487 name = "platform"
@@ -981,15 +996,6 @@ def get_install_requires(self):
981996class BackendAgg (OptionalBackendPackage ):
982997 name = "agg"
983998
984- def check (self ):
985- # The Agg backend extension needs to be built even
986- # for certain GUI backends, such as TkAgg
987- config = self .get_config ()
988- if config is False and self .force is False :
989- raise CheckFailed ("skipping due to configuration" )
990- else :
991- return "installing"
992-
993999 def get_extension (self ):
9941000 sources = [
9951001 "src/mplutils.cpp" ,
You can’t perform that action at this time.
0 commit comments