summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorLuca Falavigna <dktrkranz@debian.org>2014-04-26 15:11:58 +0200
committerLuca Falavigna <dktrkranz@debian.org>2014-04-26 15:11:58 +0200
commit140d836e9cd54fb67b969fd82ef7ed19ba574d40 (patch)
tree0df3e32ee39603d43f9b90fd2f2e1f7cce4249d4 /SConstruct
parentcb3425abe0bc2d05caf401ca24b82a25a81f009d (diff)
Imported Upstream version 2.3.1upstream/2.3.1
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct39
1 files changed, 27 insertions, 12 deletions
diff --git a/SConstruct b/SConstruct
index 6286e43..85baeda 100644
--- a/SConstruct
+++ b/SConstruct
@@ -3,15 +3,13 @@
#
# See the README.rst file for an overview of how SCons is built and tested.
-# 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, 2009, 2010, 2011, 2012, 2013'
+copyright_years = '2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014'
# This gets inserted into the man pages to reflect the month of release.
-month_year = 'March 2013'
+month_year = 'March 2014'
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation
+# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -42,8 +40,10 @@ import stat
import sys
import tempfile
+import bootstrap
+
project = 'scons'
-default_version = '2.3.0'
+default_version = '2.3.1'
copyright = "Copyright (c) %s The SCons Foundation" % copyright_years
platform = distutils.util.get_platform()
@@ -80,7 +80,7 @@ def whereis(file):
dh_builddeb = whereis('dh_builddeb')
fakeroot = whereis('fakeroot')
gzip = whereis('gzip')
-rpmbuild = whereis('rpmbuild') or whereis('rpm')
+rpmbuild = whereis('rpmbuild')
hg = os.path.exists('.hg') and whereis('hg')
svn = os.path.exists('.svn') and whereis('svn')
unzip = whereis('unzip')
@@ -168,6 +168,17 @@ if build_id is None:
python_ver = sys.version[0:3]
+#
+# Adding some paths to sys.path, this is mainly needed
+# for the doc toolchain.
+#
+addpaths = [os.path.abspath(os.path.join(os.getcwd(), 'bin')),
+ os.path.abspath(os.path.join(os.getcwd(), 'QMTest'))]
+for a in addpaths:
+ if a not in sys.path:
+ sys.path.append(a)
+
+
# Re-exporting LD_LIBRARY_PATH is necessary if the Python version was
# built with the --enable-shared option.
@@ -375,6 +386,7 @@ def SCons_revision(target, source, env):
open(t, 'wb').write(contents)
os.chmod(t, os.stat(s)[0])
+revaction = SCons_revision
revbuilder = Builder(action = Action(SCons_revision,
varlist=['COPYRIGHT', 'VERSION']))
@@ -743,7 +755,7 @@ for p in [ scons ]:
# destination files.
#
manifest_in = File(os.path.join(src, 'MANIFEST.in')).rstr()
- src_files = [x[:-1] for x in open(manifest_in).readlines()]
+ src_files = bootstrap.parseManifestLines(src, open(manifest_in).readlines())
raw_files = src_files[:]
dst_files = src_files[:]
rpm_files = []
@@ -762,7 +774,7 @@ for p in [ scons ]:
isubdir = p['subinst_dirs'][sp['pkg']]
MANIFEST_in = File(os.path.join(src, ssubdir, 'MANIFEST.in')).rstr()
MANIFEST_in_list.append(MANIFEST_in)
- files = [x[:-1] for x in open(MANIFEST_in).readlines()]
+ files = bootstrap.parseManifestLines(os.path.join(src, ssubdir), open(MANIFEST_in).readlines())
raw_files.extend(files)
src_files.extend([os.path.join(ssubdir, x) for x in files])
for f in files:
@@ -793,7 +805,7 @@ for p in [ scons ]:
#
# Now run everything in src_file through the sed command we
- # concocted to expand SConstruct, 2.3.0, etc.
+ # concocted to expand SConstruct, 2.3.1, etc.
#
for b in src_files:
s = p['filemap'].get(b, b)
@@ -1025,7 +1037,10 @@ for p in [ scons ]:
if dh_builddeb and fakeroot:
# Our Debian packaging builds directly into build/dist,
# so we don't need to Install() the .debs.
- deb = os.path.join(build_dir, 'dist', "%s_%s_all.deb" % (pkg, version))
+ # The built deb is called just x.y.z, not x.y.z.final.0 so strip those off:
+ deb_version = '.'.join(version.split('.')[0:3])
+ deb = os.path.join(build_dir, 'dist', "%s_%s_all.deb" % (pkg, deb_version))
+ # print "Building deb into %s (version=%s)"%(deb, deb_version)
for d in p['debian_deps']:
b = env.SCons_revision(os.path.join(build, d), d)
env.Depends(deb, b)
@@ -1179,7 +1194,7 @@ for file in files:
#
# Documentation.
#
-Export('build_dir', 'env', 'whereis')
+Export('build_dir', 'env', 'whereis', 'revaction')
SConscript('doc/SConscript')