From 84c6f9729dbbc175431874957d0654310410bd6f Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Thu, 10 Feb 2011 23:18:10 +0100 Subject: Imported Upstream version 2.0.1 --- bin/import-test.py | 2 +- bin/install_scons.py | 24 +++++++++++++++++++----- bin/linecount.py | 2 +- bin/restore.sh | 22 +++++++++++----------- bin/scons_dev_master.py | 6 +++++- bin/update-release-info.py | 8 ++++++-- 6 files changed, 43 insertions(+), 21 deletions(-) (limited to 'bin') diff --git a/bin/import-test.py b/bin/import-test.py index 906bab0..4991aee 100644 --- a/bin/import-test.py +++ b/bin/import-test.py @@ -25,7 +25,7 @@ # """ triple-quotes will need to have their contents edited by hand. # -__revision__ = "bin/import-test.py 5023 2010/06/14 22:05:46 scons" +__revision__ = "bin/import-test.py 5134 2010/08/16 23:02:40 bdeegan" import os.path import sys diff --git a/bin/install_scons.py b/bin/install_scons.py index b5e0af8..00129f6 100644 --- a/bin/install_scons.py +++ b/bin/install_scons.py @@ -22,6 +22,8 @@ import getopt import os import shutil import sys +import tarfile +import urllib from Command import CommandRunner, Usage @@ -87,7 +89,12 @@ all_versions = [ '1.3.0', '1.3.0.d20100404', '1.3.0.d20100501', + '1.3.0.d20100523', + '1.3.0.d20100606', '2.0.0.alpha.20100508', + '2.0.0.beta.20100531', + '2.0.0.beta.20100605', + '2.0.0.final.0', ] def main(argv=None): @@ -97,8 +104,12 @@ def main(argv=None): all = False downloads_dir = 'Downloads' downloads_url = 'http://downloads.sourceforge.net/scons' - sudo = 'sudo' - prefix = '/usr/local' + if sys.platform == 'win32': + sudo = '' + prefix = sys.prefix + else: + sudo = 'sudo' + prefix = '/usr/local' python = sys.executable short_options = 'ad:hnp:q' @@ -153,16 +164,19 @@ Usage: install_scons.py [-ahnq] [-d DIR] [-p PREFIX] [VERSION ...] for version in args: scons = 'scons-' + version tar_gz = os.path.join(downloads_dir, scons + '.tar.gz') - tar_gz_url = os.path.join(downloads_url, scons + '.tar.gz') + tar_gz_url = "%s/%s.tar.gz" % (downloads_url, scons) cmd.subst_dictionary(locals()) if not os.path.exists(tar_gz): if not os.path.exists(downloads_dir): cmd.run('mkdir %(downloads_dir)s') - cmd.run('wget -O %(tar_gz)s %(tar_gz_url)s') + cmd.run((urllib.urlretrieve, tar_gz_url, tar_gz), + 'wget -O %(tar_gz)s %(tar_gz_url)s') - cmd.run('tar zxf %(tar_gz)s') + def extract(tar_gz): + tarfile.open(tar_gz, "r:gz").extractall() + cmd.run((extract, tar_gz), 'tar zxf %(tar_gz)s') cmd.run('cd %(scons)s') diff --git a/bin/linecount.py b/bin/linecount.py index 7d6e457..9d0be94 100644 --- a/bin/linecount.py +++ b/bin/linecount.py @@ -23,7 +23,7 @@ # interesting one for most purposes. from __future__ import division -__revision__ = "bin/linecount.py 5023 2010/06/14 22:05:46 scons" +__revision__ = "bin/linecount.py 5134 2010/08/16 23:02:40 bdeegan" import os.path diff --git a/bin/restore.sh b/bin/restore.sh index 3fd8d72..6db56f1 100644 --- a/bin/restore.sh +++ b/bin/restore.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh # -# Simple hack script to restore __revision__, __COPYRIGHT_, 2.0.0.final.0 +# Simple hack script to restore __revision__, __COPYRIGHT_, 2.0.1 # and other similar variables to what gets checked in to source. This # comes in handy when people send in diffs based on the released source. # @@ -24,7 +24,7 @@ for i in `find $DIRS -name '*.py'`; do ed $i <