def __init__(self, package, version):
        """Construct a new requirement.

        :param package: the package name.
        :param version: a semver compatible version specification.
        """
        self.package = package
        self.version = version
        if self.version and not re.match(r"[<=>~]", version[:2]):
            self.version = "=={}".format(self.version)
def deserialize(self, value):
        value = decode(value)
        validators.validate_required(value, self._required)
        if not value:
            return None
        if value.lower() in self.true_values:
            return True
        elif value.lower() in self.false_values:
            return False
        raise ValueError(f"invalid value for boolean: {value!r}")