Files
python-build/pythonbrew_install.py
2011-08-08 02:51:43 +09:00

26 lines
689 B
Python

from pythonbrew.installer import install_pythonbrew, upgrade_pythonbrew, systemwide_pythonbrew
from optparse import OptionParser
if __name__ == "__main__":
parser = OptionParser()
parser.add_option(
'-U', '--upgrade',
dest="upgrade",
action="store_true",
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.systemwide:
systemwide_pythonbrew()
elif opt.upgrade:
upgrade_pythonbrew()
else:
install_pythonbrew()