Commits

Michał Górny  committed 2e8a332

Support getting keywords off packages.

  • Participants
  • Parent commits b65cc5e

Comments (0)

Files changed (4)

File gentoopm/basepm/pkg.py

 		"""
 		pass
 
+	@abstractproperty
+	def keywords(self):
+		"""
+		Package keywords.
+
+		@type: L{SpaceSepTuple}
+		"""
+		pass
+
 	@property
 	def environ(self):
 		"""

File gentoopm/paludispm/pkg.py

 		return SpaceSepTuple([str(x) for x in spec])
 
 	@property
+	def keywords(self):
+		kws = self._pkg.keywords_key().parse_value()
+		return SpaceSepTuple([str(x) for x in kws])
+
+	@property
 	def slot(self):
 		k = self._pkg.slot_key()
 		return str(k.parse_value())

File gentoopm/pkgcorepm/pkg.py

 		return SpaceSepTuple(self._pkg.homepage)
 
 	@property
+	def keywords(self):
+		return SpaceSepTuple(self._pkg.keywords)
+
+	@property
 	def defined_phases(self):
 		return SpaceSepTuple(self._pkg.defined_phases)
 

File gentoopm/portagepm/pkg.py

 		return SpaceSepTuple(self._aux_get('HOMEPAGE'))
 
 	@property
+	def keywords(self):
+		return SpaceSepTuple(self._aux_get('KEYWORDS'))
+
+	@property
 	def slot(self):
 		return self._aux_get('SLOT')