This commit is contained in:
utahta
2011-08-29 18:01:31 +09:00
parent e7943488de
commit ea7cb63494
25 changed files with 321 additions and 211 deletions
+24 -9
View File
@@ -3,8 +3,6 @@ from pythonbrew.basecommand import Command
from pythonbrew.installer.pythoninstaller import PythonInstaller,\
PythonInstallerMacOSX
from pythonbrew.util import is_macosx
from pythonbrew.exceptions import UnknownVersionException,\
AlreadyInstalledException, NotSupportedVersionException
class InstallCommand(Command):
name = "install"
@@ -61,7 +59,28 @@ class InstallCommand(Command):
default=0,
help="Enable parallel make."
)
self.parser.add_option(
"--framework",
dest="framework",
action="store_true",
default=False,
help="Build (MacOSX|Darwin) framework."
)
self.parser.add_option(
"--universal",
dest="universal",
action="store_true",
default=False,
help="Build for both 32 & 64 bit Intel."
)
self.parser.add_option(
"--static",
dest="static",
action="store_true",
default=False,
help="Build static libraries."
)
def run_command(self, options, args):
if not args:
self.parser.print_help()
@@ -74,11 +93,7 @@ class InstallCommand(Command):
else:
p = PythonInstaller(arg, options)
p.install()
except UnknownVersionException:
except:
continue
except AlreadyInstalledException:
continue
except NotSupportedVersionException:
continue
InstallCommand()
+2 -2
View File
@@ -6,7 +6,7 @@ from pythonbrew.define import PATH_DISTS, VERSION, ROOT,\
from pythonbrew.log import logger
from pythonbrew.downloader import Downloader, get_pythonbrew_update_url,\
get_stable_version, get_headerinfo_from_url
from pythonbrew.util import rm_r, extract_downloadfile, Link, is_gzip, Subprocess
from pythonbrew.util import rm_r, extract_downloadfile, Link, is_gzip, Subprocess, Version
class UpdateCommand(Command):
name = "update"
@@ -75,7 +75,7 @@ class UpdateCommand(Command):
else:
version = get_stable_version()
# check for version
if not options.force and version <= VERSION:
if not options.force and Version(version) <= VERSION:
logger.info("You are already running the installed latest version of pythonbrew.")
return