def check_prerequisites(self, build): """ Check prerequisites The check should cover all dependencies needed for the extension to be built and run. The method can do the following: - return a false value: the extension will be built - return a true value: the extension will be skipped. This is useful for optional extensions - raise an exception. This is useful for mandatory extensions If the check result is cacheable (during the setup run), override `cached_check_prerequisites` instead. :Parameters: `build` : `BuildExt` The extension builder :Return: Skip the extension? :Rtype: ``bool`` """ if self.cached_check is None: log.debug("PREREQ check for %s" % self.name) self.cached_check = self.cached_check_prerequisites(build) else: log.debug("PREREQ check for %s (cached)" % self.name) return self.cached_check
def cached_check_prerequisites(self, build): """ Check prerequisites The check should cover all dependencies needed for the extension to be built and run. The method can do the following: - return a false value: the extension will be built - return a true value: the extension will be skipped. This is useful for optional extensions - raise an exception. This is useful for mandatory extensions If the check result is *not* cacheable (during the setup run), override `check_prerequisites` instead. :Parameters: `build` : `BuildExt` The extension builder :Return: Skip the extension? :Rtype: ``bool`` """ # pylint: disable = W0613 log.debug("Nothing to check for %s!" % self.name) return False