1. Michał Górny
  2. gentoopm

Commits

Michał Górny  committed 1bf175a

Support getting ebuild EAPI.

  • Participants
  • Parent commits 00be1d0
  • Branches master

Comments (0)

Files changed (4)

File gentoopm/basepm/pkg.py

View file
 		pass
 
 	@abstractproperty
+	def eapi(self):
+		"""
+		The EAPI used by the ebuild.
+
+		@type: string
+		"""
+		pass
+
+	@abstractproperty
 	def description(self):
 		"""
 		The description of the package.

File gentoopm/paludispm/pkg.py

View file
 		return PaludisPackageVersion(self._pkg.version)
 
 	@property
+	def eapi(self):
+		k = self._pkg.find_metadata('EAPI')
+		return str(k.parse_value())
+
+	@property
 	def description(self):
 		return PaludisPackageDescription(self._pkg)
 

File gentoopm/pkgcorepm/pkg.py

View file
 		return self._pkg.path
 
 	@property
+	def eapi(self):
+		return str(self._pkg.eapi)
+
+	@property
 	def description(self):
 		return PkgCorePackageDescription(self._pkg)
 

File gentoopm/portagepm/pkg.py

View file
 			return tuple(val)
 
 	@property
+	def eapi(self):
+		return self._aux_get('EAPI')
+
+	@property
 	def description(self):
 		return PortagePackageDescription(self)