release 0.10

This commit is contained in:
utahta
2011-08-08 02:51:43 +09:00
parent 7bdb546fa4
commit 770715b536
30 changed files with 482 additions and 255 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
import os
import sys
from pythonbrew.basecommand import Command
from pythonbrew.define import PATH_PYTHONS, PATH_BIN
from pythonbrew.define import PATH_PYTHONS
from pythonbrew.util import Package, set_current_path, is_installed
from pythonbrew.log import logger
@@ -12,16 +12,16 @@ class SwitchCommand(Command):
def run_command(self, options, args):
if not args:
logger.info("Unrecognized command line argument: argument not found.")
self.parser.print_help()
sys.exit(1)
pkg = Package(args[0])
pkgname = pkg.name
if not is_installed(pkgname):
logger.info("`%s` is not installed." % pkgname)
logger.error("`%s` is not installed." % pkgname)
sys.exit(1)
pkgbin = os.path.join(PATH_PYTHONS,pkgname,'bin')
set_current_path('%s:%s' % (PATH_BIN, pkgbin))
set_current_path(pkgbin)
logger.info("Switched to %s" % pkgname)