add systemwide install support

This commit is contained in:
utahta
2011-08-07 03:48:38 +09:00
parent 7b2fa2f0eb
commit 4993f466e9
6 changed files with 126 additions and 38 deletions
+11 -2
View File
@@ -1,4 +1,4 @@
from pythonbrew.installer import install_pythonbrew, upgrade_pythonbrew
from pythonbrew.installer import install_pythonbrew, upgrade_pythonbrew, systemwide_pythonbrew
from optparse import OptionParser
if __name__ == "__main__":
parser = OptionParser()
@@ -9,8 +9,17 @@ if __name__ == "__main__":
default=False,
help="Upgrade."
)
parser.add_option(
'--systemwide',
dest="systemwide",
action="store_true",
default=False,
help="systemwide install."
)
(opt, arg) = parser.parse_args()
if opt.upgrade:
if opt.systemwide:
systemwide_pythonbrew()
elif opt.upgrade:
upgrade_pythonbrew()
else:
install_pythonbrew()