refactoring

This commit is contained in:
utahta
2011-04-13 18:11:37 +09:00
parent cdb92c3e2a
commit 867ffcb054
5 changed files with 172 additions and 146 deletions
+8 -2
View File
@@ -1,6 +1,8 @@
from pythonbrew.basecommand import Command
from pythonbrew.log import logger
from pythonbrew.installer import PythonInstaller
from pythonbrew.installer.pythoninstaller import PythonInstaller,\
PythonInstallerMacOSX
from pythonbrew.util import is_macosx_snowleopard
class InstallCommand(Command):
name = "install"
@@ -47,7 +49,11 @@ class InstallCommand(Command):
def run_command(self, options, args):
if args:
# Install Python
PythonInstaller(args[0], options).install()
if is_macosx_snowleopard():
p = PythonInstallerMacOSX(args[0], options)
else:
p = PythonInstaller(args[0], options)
p.install()
else:
logger.info("Unknown python version.")