Commits

Michał Górny committed 9f78653

Introduce an abstract exactly-one-of dep.

Comments (0)

Files changed (1)

gentoopm/basepm/depend.py

 class PMUncondAnyOfDep(PMAnyOfDep, PMUncondBaseDep):
 	pass
 
+class PMExactlyOneOfDep(PMBaseDep):
+	"""
+	An exactly-one-of (xor) dependency set (C{^^ ( ... )}).
+	"""
+
+	@property
+	def without_conditionals(self):
+		return PMUncondExactlyOneOfDep(self)
+
+class PMUncondExactlyOneOfDep(PMExactlyOneOfDep, PMUncondBaseDep):
+	pass
+
 class PMPackageDepSet(PMAllOfDep):
 	"""
 	A base class representing a depset (or depset-like variable) of a single