diff --git a/specfile/utils.py b/specfile/utils.py index a628a0f..4ab2368 100644 --- a/specfile/utils.py +++ b/specfile/utils.py @@ -98,6 +98,9 @@ def __init__( def _key(self) -> tuple: return self.name, self.epoch, self.version, self.release + def __hash__(self) -> int: + return hash(self._key()) + def __lt__(self, other: object) -> bool: if type(other) is not self.__class__: return NotImplemented @@ -172,6 +175,9 @@ def __init__( def _key(self) -> tuple: return self.name, self.epoch, self.version, self.release, self.arch + def __hash__(self) -> int: + return hash(self._key()) + def __lt__(self, other: object) -> bool: if type(other) is not self.__class__: return NotImplemented