Match ``package`` with the requirement.

        :param package: Package to test with the requirement.
        :type package: package expression string or :class:`Package`
        :returns: ``True`` if ``package`` satisfies the requirement.
        :rtype: bool

def match(self, package):
        """Match ``package`` with the requirement.

        :param package: Package to test with the requirement.
        :type package: package expression string or :class:`Package`
        :returns: ``True`` if ``package`` satisfies the requirement.
        :rtype: bool

        """
        if isinstance(package, basestring):
            from .packages import Package
            package = Package.parse(package)

        if self.name != package.name:
            return False

        if self.version_constraints and \
                package.version not in self.version_constraints:
            return False

        if self.build_options:
            if package.build_options:
                if self.build_options - package.build_options:
                    return False
                else:
                    return True
            else:
                return False
        else:
            return True