# When this gets changed, you must also change the copyright_years string
# in QMTest/TestSCons.py so the test scripts look for the right string.
-copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008'
+copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010'
# This gets inserted into the man pages to reflect the month of release.
-month_year = 'December 2008'
+month_year = 'January 2010'
#
# __COPYRIGHT__
default_version = '1.2.0'
copyright = "Copyright (c) %s The SCons Foundation" % copyright_years
+platform = distutils.util.get_platform()
+
SConsignFile()
#
# is available on this system.
#
def whereis(file):
+ exts = ['']
+ if platform == "win32":
+ exts += ['.exe']
for dir in string.split(os.environ['PATH'], os.pathsep):
f = os.path.join(dir, file)
- if os.path.isfile(f):
- try:
- st = os.stat(f)
- except:
- continue
- if stat.S_IMODE(st[stat.ST_MODE]) & 0111:
- return f
+ for ext in exts:
+ f_ext = f + ext
+ if os.path.isfile(f_ext):
+ try:
+ st = os.stat(f_ext)
+ except:
+ continue
+ if stat.S_IMODE(st[stat.ST_MODE]) & 0111:
+ return f_ext
return None
#
fakeroot = whereis('fakeroot')
gzip = whereis('gzip')
rpmbuild = whereis('rpmbuild') or whereis('rpm')
-hg = whereis('hg')
-svn = whereis('svn')
+hg = os.path.exists('.hg') and whereis('hg')
+svn = os.path.exists('.svn') and whereis('svn')
unzip = whereis('unzip')
zip = whereis('zip')
python_ver = sys.version[0:3]
-platform = distutils.util.get_platform()
-
# Re-exporting LD_LIBRARY_PATH is necessary if the Python version was
# built with the --enable-shared option.
platform_zip = os.path.join(build,
'dist',
"%s.%s.zip" % (pkg_version, platform))
- win32_exe = os.path.join(build, 'dist', "%s.win32.exe" % pkg_version)
+ if platform == "win-amd64":
+ win32_exe = os.path.join(build, 'dist', "%s.win-amd64.exe" % pkg_version)
+ else:
+ win32_exe = os.path.join(build, 'dist', "%s.win32.exe" % pkg_version)
#
# Update the environment with the relevant information
AddPostAction(dist_distutils_targets, Chmod(dist_distutils_targets, 0644))
if not gzip:
- print "gzip not found; skipping .tar.gz package for %s." % pkg
+ print "gzip not found in %s; skipping .tar.gz package for %s." % (os.environ['PATH'], pkg)
else:
distutils_formats.append('gztar')