summaryrefslogtreecommitdiffstats
path: root/bin/install_python.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2009-02-19 05:58:40 (GMT)
committerSteven Knight <knight@baldmt.com>2009-02-19 05:58:40 (GMT)
commit29ad561d6bb373384273e24047efa79a88d406e7 (patch)
tree1d23d7c44adbd0e2664b36eded3ae93876ae8500 /bin/install_python.py
parentcfe6f670564137abdd937f994a4557f653e911b9 (diff)
downloadSCons-29ad561d6bb373384273e24047efa79a88d406e7.zip
SCons-29ad561d6bb373384273e24047efa79a88d406e7.tar.gz
SCons-29ad561d6bb373384273e24047efa79a88d406e7.tar.bz2
dd newer SCons versions to the list of all versions available for install.
Use shlex.split(), not string.split(), to split command line arguments. Commonize interpreation of 'cd' and 'mkdir' commands. Fix usage messages.
Diffstat (limited to 'bin/install_python.py')
-rw-r--r--bin/install_python.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/install_python.py b/bin/install_python.py
index fff834c..ca1c8b7 100644
--- a/bin/install_python.py
+++ b/bin/install_python.py
@@ -39,14 +39,14 @@ def main(argv=None):
long_options = ['all', 'help', 'no-exec', 'prefix=', 'quiet']
helpstr = """\
-sage: installs-scons.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
+Usage: install_python.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
-a, --all Install all SCons versions.
-d DIR, --downloads=DIR Downloads directory.
-h, --help Print this help and exit
- -n, --no-exec No execute, just print the command line
+ -n, --no-exec No execute, just print command lines
-p PREFIX, --prefix=PREFIX Installation prefix.
- -q, --quiet Quiet, don't print the command line
+ -q, --quiet Quiet, don't print command lines
"""
try:
@@ -103,13 +103,12 @@ sage: installs-scons.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
if not os.path.exists(tar_gz):
if not os.path.exists(downloads_dir):
- cmd.run((os.mkdir, downloads_dir),
- 'mkdir %(downloads_dir)s')
+ cmd.run('mkdir %(downloads_dir)s')
cmd.run('wget -O %(tar_gz)s %(tar_gz_url)s')
cmd.run('tar zxf %(tar_gz)s')
- cmd.run((os.chdir, python), 'cd %(python)s')
+ cmd.run('cd %(python)s')
if (version.startswith('1.6') or
version.startswith('2.0')):
@@ -128,7 +127,7 @@ sage: installs-scons.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...]
cmd.run('%(sudo)s rm -f %(prefix)s/bin/{idle,pydoc,python,python-config,smtpd.py}')
- cmd.run((os.chdir, '..'), 'cd ..')
+ cmd.run('cd ..')
cmd.run((shutil.rmtree, python), 'rm -rf %(python)s')