Exemplo n.º 1
0
	def preInstall(self):
		if sys.version_info[0] >= 3 or sys.version_info <= (2,5):
			raise Exception("This module only supports Python 2.6 or 2.7")
		
		from Lang import DescribeOS
		if DescribeOS.isDebianBased():
			global requirements
			requirements.append("python-apt")
		elif DescribeOS.isRedHatBased():
			# red hat based OSs come with a python yum module already installed
			try:
				import yum
			except ImportError:
				raise Exception("Error: Could not find the python yum module. If you installed py.OS in a virtualenv, use --system-site-packages to give access to python yum. You will need to re-create the virtualenv to do this.")
Exemplo n.º 2
0
	def isSupported(cls):
		return DescribeOS.isDebianBased()
Exemplo n.º 3
0
	def isSupported(cls):
		return DescribeOS.isRedHatBased()