示例#1
0
    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
示例#2
0
文件: ext.py 项目: Alattack/catapult
    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
示例#3
0
    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
示例#4
0
文件: ext.py 项目: Alattack/catapult
    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