diff options
author | Andrew Meadows <andrew@lindenlab.com> | 2008-10-10 16:04:02 +0000 |
---|---|---|
committer | Andrew Meadows <andrew@lindenlab.com> | 2008-10-10 16:04:02 +0000 |
commit | 5f3875018ee9977917d6fff5f2c2cf87db41ce3e (patch) | |
tree | 63ae291bed617d557b5c745a614a2e1cf21e9469 /scripts | |
parent | 4ff16b735f59326514ad92ec38e3261cd996e05c (diff) |
svn merge -r99056:99248 svn+ssh://svn.lindenlab.com/svn/linden/branches/andrew/gcc-4-003-for-merge
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/install.py | 19 | ||||
-rwxr-xr-x | scripts/template_verifier.py | 32 | ||||
-rwxr-xr-x | scripts/update_version_files.py | 15 |
3 files changed, 58 insertions, 8 deletions
diff --git a/scripts/install.py b/scripts/install.py index 522fa6e9d9..bb22d16a1a 100755 --- a/scripts/install.py +++ b/scripts/install.py @@ -37,6 +37,7 @@ import copy import md5 import optparse import os +import platform import pprint import shutil import sys @@ -737,7 +738,23 @@ def _get_platform(): 'cygwin' : 'windows', 'solaris' : 'solaris' } - return platform_map[sys.platform] + this_platform = platform_map[sys.platform] + if this_platform == 'linux': + if platform.architecture()[0] == '64bit': + # TODO -- someday when install.py accepts a platform of the form + # os/arch/compiler/compiler_version then we can replace the + # 'linux64' platform with 'linux/x86_64/gcc/4.1' + this_platform = 'linux64' + else: + gcc_version = os.popen("g++ -dumpversion", 'r').read()[:-3] + if gcc_version == '4.1': + # the 'linux32' platform is a HACK until we can figure + # out how to make the install.py script accept a platform of + # the form os/arch/compiler/compiler_version for the download + # and extract stage + #this_platform = 'linux/i686/gcc/4.1' + this_platform = 'linux32' + return this_platform def _getuser(): "Get the user" diff --git a/scripts/template_verifier.py b/scripts/template_verifier.py index a7dbda9e3b..581f1168ff 100755 --- a/scripts/template_verifier.py +++ b/scripts/template_verifier.py @@ -38,13 +38,35 @@ If [FILE] [FILE] is specified, two local files will be checked against each other. """ -from os.path import realpath, dirname, join, exists -setup_path = join(dirname(realpath(__file__)), "setup-path.py") -if exists(setup_path): - execfile(setup_path) +import sys +import os.path + +# Look for indra/lib/python in all possible parent directories ... +# This is an improvement over the setup-path.py method used previously: +# * the script may blocated anywhere inside the source tree +# * it doesn't depend on the current directory +# * it doesn't depend on another file being present. + +root = os.path.abspath(__file__) +# always insert the directory of the script in the search path +dir = os.path.dirname(root) +if dir not in sys.path: + sys.path.insert(0, dir) + +# Now go look for indra/lib/python in the parent dies +while root != os.path.sep: + root = os.path.dirname(root) + dir = os.path.join(root, 'indra', 'lib', 'python') + if os.path.isdir(dir): + if dir not in sys.path: + sys.path.insert(0, dir) + break +else: + print >>sys.stderr, "This script is not inside a valid installation." + sys.exit(1) + import optparse import os -import sys import urllib from indra.ipc import compatibility diff --git a/scripts/update_version_files.py b/scripts/update_version_files.py index 528eedc23a..87a3b6f389 100755 --- a/scripts/update_version_files.py +++ b/scripts/update_version_files.py @@ -5,10 +5,21 @@ # import sys -import os import os.path +# Look for indra/lib/python in all possible parent directories ... +# This is an improvement over the setup-path.py method used previously: +# * the script may blocated anywhere inside the source tree +# * it doesn't depend on the current directory +# * it doesn't depend on another file being present. + root = os.path.abspath(__file__) +# always insert the directory of the script in the search path +dir = os.path.dirname(root) +if dir not in sys.path: + sys.path.insert(0, dir) + +# Now go look for indra/lib/python in the parent dies while root != os.path.sep: root = os.path.dirname(root) dir = os.path.join(root, 'indra', 'lib', 'python') @@ -20,7 +31,7 @@ else: print >>sys.stderr, "This script is not inside a valid installation." sys.exit(1) -import getopt, sys, os, re, commands +import getopt, os, re, commands from indra.util import llversion svn = os.path.expandvars("${SVN}") |