summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/SConscript35
-rw-r--r--doc/design/engine.xml12
-rw-r--r--doc/design/goals.xml2
-rw-r--r--doc/design/native.xml6
-rw-r--r--doc/design/overview.xml2
-rw-r--r--doc/developer/preface.xml2
-rw-r--r--doc/man/scons-time.14
-rw-r--r--doc/man/scons.188
-rw-r--r--doc/man/sconsign.14
-rw-r--r--doc/python10/abstract.xml2
-rw-r--r--doc/python10/design.xml50
-rw-r--r--doc/python10/main.xml2
-rw-r--r--doc/python10/process.xml4
-rw-r--r--doc/scons.mod7
-rw-r--r--doc/user/actions.in4
-rw-r--r--doc/user/actions.xml4
-rw-r--r--doc/user/build-install.in35
-rw-r--r--doc/user/build-install.xml35
-rw-r--r--doc/user/builders-built-in.in13
-rw-r--r--doc/user/builders-built-in.xml13
-rw-r--r--doc/user/builders-writing.in30
-rw-r--r--doc/user/builders-writing.xml14
-rw-r--r--doc/user/command-line.in8
-rw-r--r--doc/user/command-line.xml8
-rw-r--r--doc/user/depends.in7
-rw-r--r--doc/user/depends.xml7
-rw-r--r--doc/user/environments.in88
-rw-r--r--doc/user/environments.xml89
-rw-r--r--doc/user/less-simple.in2
-rw-r--r--doc/user/less-simple.xml2
-rw-r--r--doc/user/main.in11
-rw-r--r--doc/user/main.xml7
-rw-r--r--doc/user/misc.in4
-rw-r--r--doc/user/misc.xml6
-rw-r--r--doc/user/nodes.in45
-rw-r--r--doc/user/nodes.xml45
-rw-r--r--doc/user/parseflags.in16
-rw-r--r--doc/user/parseflags.xml16
-rw-r--r--doc/user/scanners.in50
-rw-r--r--doc/user/scanners.xml48
-rw-r--r--doc/user/tasks.in27
-rw-r--r--doc/user/tasks.xml27
-rw-r--r--doc/user/troubleshoot.xml40
43 files changed, 574 insertions, 347 deletions
diff --git a/doc/SConscript b/doc/SConscript
index 9ad4d12..e0b3f71 100644
--- a/doc/SConscript
+++ b/doc/SConscript
@@ -23,11 +23,9 @@
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
import os.path
import re
-import string
Import('build_dir', 'env', 'whereis')
@@ -93,7 +91,7 @@ def scanxml(node, env, target):
if tail == 'doc':
break
a = [tail] + a
- file = apply(os.path.join, a, {})
+ file = os.path.join(*a)
includes.append(file)
return includes
@@ -119,8 +117,8 @@ def chop(s): return s[:-1]
#manifest_in = File('#src/engine/MANIFEST.in').rstr()
manifest_xml_in = File('#src/engine/MANIFEST-xml.in').rstr()
-scons_doc_files = map(chop, open(manifest_xml_in).readlines())
-scons_doc_files = map(lambda x: File('#src/engine/'+x).rstr(), scons_doc_files)
+scons_doc_files = list(map(chop, open(manifest_xml_in).readlines()))
+scons_doc_files = [File('#src/engine/'+x).rstr() for x in scons_doc_files]
if not jw:
print "jw not found, skipping building User Guide."
@@ -240,7 +238,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT.
# get included by the document XML files in the subdirectories.
#
manifest = File('MANIFEST').rstr()
- src_files = map(lambda x: x[:-1], open(manifest).readlines())
+ src_files = [x[:-1] for x in open(manifest).readlines()]
for s in src_files:
base, ext = os.path.splitext(s)
if ext in ['.fig', '.jpg']:
@@ -255,8 +253,7 @@ THIS IS AN AUTOMATICALLY-GENERATED FILE. DO NOT EDIT.
#
for doc in docs.keys():
manifest = File(os.path.join(doc, 'MANIFEST')).rstr()
- src_files = map(lambda x: x[:-1],
- open(manifest).readlines())
+ src_files = [x[:-1] for x in open(manifest).readlines()]
build_doc = docs[doc].get('scons-doc') and int(ARGUMENTS.get('BUILDDOC', 0))
for s in src_files:
doc_s = os.path.join(doc, s)
@@ -408,8 +405,7 @@ for m in man_page_list:
man_i_files = ['builders.man', 'tools.man', 'variables.man']
-man_intermediate_files = map(lambda x: os.path.join(build, 'man', x),
- man_i_files)
+man_intermediate_files = [os.path.join(build, 'man', x) for x in man_i_files]
cmd = "$PYTHON $SCONS_PROC_PY --man -b ${TARGETS[0]} -t ${TARGETS[1]} -v ${TARGETS[2]} $( $SOURCES $)"
man_intermediate_files = env.Command(man_intermediate_files,
@@ -444,12 +440,12 @@ for man_1 in man_page_list:
def strip_to_first_html_tag(target, source, env):
t = str(target[0])
contents = open(t).read()
- contents = contents[string.find(contents, '<HTML>'):]
+ contents = contents[contents.find('<HTML>'):]
open(t, 'w').write(contents)
return 0
cmds = [
- "( cd %s/man && cp %s .. )" % (build, string.join(man_i_files)),
+ "( cd %s/man && cp %s .. )" % (build, ' '.join(man_i_files)),
"( cd ${SOURCE.dir} && man2html ${SOURCE.file} ) > $TARGET",
Action(strip_to_first_html_tag),
]
@@ -469,15 +465,15 @@ else:
# the SConstruct file.
e = os.path.join('#src', 'engine')
manifest_in = File(os.path.join(e, 'MANIFEST.in')).rstr()
- sources = map(lambda x: x[:-1], open(manifest_in).readlines())
- sources = filter(lambda x: string.find(x, 'Optik') == -1, sources)
- sources = filter(lambda x: string.find(x, 'Platform') == -1, sources)
- sources = filter(lambda x: string.find(x, 'Tool') == -1, sources)
+ sources = [x[:-1] for x in open(manifest_in).readlines()]
+ sources = [x for x in sources if x.find('Optik') == -1]
+ sources = [x for x in sources if x.find('Platform') == -1]
+ sources = [x for x in sources if x.find('Tool') == -1]
# XXX
- sources = filter(lambda x: string.find(x, 'Options') == -1, sources)
+ sources = [x for x in sources if x.find('Options') == -1]
e = os.path.join(build, '..', 'scons', 'engine')
- sources = map(lambda x, e=e: os.path.join(e, x), sources)
+ sources = [os.path.join(e, x) for x in sources]
epydoc_commands = [
Delete('$OUTDIR'),
@@ -519,8 +515,7 @@ else:
# for easy distribution to the web site.
#
if tar_deps:
- tar_list = string.join(map(lambda x, b=build+'/': string.replace(x, b, ''),
- tar_list))
+ tar_list = ' '.join([x.replace(build+'/', '') for x in tar_list])
t = env.Command(dist_doc_tar_gz, tar_deps,
"tar cf${TAR_HFLAG} - -C %s %s | gzip > $TARGET" % (build, tar_list))
AddPostAction(dist_doc_tar_gz, Chmod(dist_doc_tar_gz, 0644))
diff --git a/doc/design/engine.xml b/doc/design/engine.xml
index 1a1e335..afe9877 100644
--- a/doc/design/engine.xml
+++ b/doc/design/engine.xml
@@ -85,7 +85,7 @@
<section id="sect-envs">
- <title>&ConsEnvs</title>
+ <title>&ConsEnvs;</title>
<para>
@@ -129,7 +129,7 @@
<footnote>
<para>
It would be nice if we could avoid re-inventing the wheel here by
- using some other Python-based tool &Autoconf replacement--like what
+ using some other Python-based tool &Autoconf; replacement--like what
was supposed to come out of the Software Carpentry configuration
tool contest. It will probably be most efficient to roll our own
logic initially and convert if something better does come along.
@@ -283,7 +283,7 @@
MyBuilder = Builder(command = "$XX $XXFLAGS -c $_INPUTS -o $target")
env.Command(targets = 'bar.out', sources = 'bar.in',
- command = "sed '1d' < $source > $target")
+ command = "sed '1d' &lt; $source > $target")
</programlisting>
<para>
@@ -317,7 +317,7 @@
<programlisting>
env = Environment(FUNC = myfunc)
env.Command(target = 'foo.out', source = 'foo.in',
- command = "${FUNC($<)}")
+ command = "${FUNC($&lt;)}")
</programlisting>
<para>
@@ -1678,8 +1678,8 @@ I dunno, maybe this is fine as it is...
<literal>target</literal> (that is, one passed to the
&Build; or &Clean; method). Objects which a top-level
<literal>target</literal> is directly dependent upon have a
- <literal>level</literal> of <1>, their direct dependencies have a
- <literal>level</literal> of <2>, etc. Typically used to indent
+ <literal>level</literal> of &lt;1>, their direct dependencies have a
+ <literal>level</literal> of &lt;2>, etc. Typically used to indent
output to reflect the recursive levels.
</para>
diff --git a/doc/design/goals.xml b/doc/design/goals.xml
index 2a7b69b..f2e6b7c 100644
--- a/doc/design/goals.xml
+++ b/doc/design/goals.xml
@@ -26,7 +26,7 @@
<para>
As a next-generation build tool,
- &SCons should fundamentally
+ &SCons; should fundamentally
improve on its predecessors.
Rather than simply being driven by trying to
<emphasis>not</emphasis> be like previous tools,
diff --git a/doc/design/native.xml b/doc/design/native.xml
index 8cdd867..c665e0c 100644
--- a/doc/design/native.xml
+++ b/doc/design/native.xml
@@ -52,7 +52,7 @@
<para>
By default, the &SCons; utility searches for a file named
- &SConstruct;, &Sconstruct; or &sconstruct (in that order) in the
+ &SConstruct;, &Sconstruct; or &sconstruct; (in that order) in the
current directory, and reads its configuration from the first file
found. A <option>-f</option> command-line option exists to read a
different file name.
@@ -175,7 +175,7 @@
Any variables (not just &SCons; objects) that are to be shared between configuration files must be
explicitly passed in the &SConscript; call
- using the &Export method:
+ using the &Export; method:
</para>
@@ -261,7 +261,7 @@ Equivalent to the above example:
<para>
- &SCons; will allow users to share &consenvs, as well as other &SCons;
+ &SCons; will allow users to share &consenvs;, as well as other &SCons;
objects and Python variables, by importing them from a central, shared
repository using normal Python syntax:
diff --git a/doc/design/overview.xml b/doc/design/overview.xml
index 38e4258..266c9e8 100644
--- a/doc/design/overview.xml
+++ b/doc/design/overview.xml
@@ -409,7 +409,7 @@ This is where it will go, anyway...
<para>
An alternate &SCons; interface would provide backwards
- compatibility with the classic &Make utility.
+ compatibility with the classic &Make; utility.
This would be done by embedding the &SCons; Build Engine
in a Python script that can translate existing
&Makefile;s into the underlying calls to the
diff --git a/doc/developer/preface.xml b/doc/developer/preface.xml
index 05b7562..da2964c 100644
--- a/doc/developer/preface.xml
+++ b/doc/developer/preface.xml
@@ -36,7 +36,7 @@
<para>
There are a few overriding principles
- we try to live up to in designing and implementing &SCons:
+ we try to live up to in designing and implementing &SCons;:
</para>
diff --git a/doc/man/scons-time.1 b/doc/man/scons-time.1
index 4160986..81417c3 100644
--- a/doc/man/scons-time.1
+++ b/doc/man/scons-time.1
@@ -19,7 +19,7 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/scons-time.1 4720 2010/03/24 03:14:11 jars
+.\" doc/man/scons-time.1 5023 2010/06/14 22:05:46 scons
.\"
.\" ES - Example Start - indents and turns off line fill
.de ES
@@ -98,7 +98,7 @@
[\fB--which=\fIWHICH\fR]
[\fIARGUMENTS\fR]
..
-.TH SCONS-TIME 1 "March 2010"
+.TH SCONS-TIME 1 "June 2010"
.SH NAME
scons-time \- generate and display SCons timing information
'\"==========================================================================
diff --git a/doc/man/scons.1 b/doc/man/scons.1
index 0cfe62a..9617fec 100644
--- a/doc/man/scons.1
+++ b/doc/man/scons.1
@@ -19,9 +19,9 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/scons.1 4720 2010/03/24 03:14:11 jars
+.\" doc/man/scons.1 5023 2010/06/14 22:05:46 scons
.\"
-.TH SCONS 1 "March 2010"
+.TH SCONS 1 "June 2010"
.\" ES - Example Start - indents and turns off line fill
.rm ES
.de ES
@@ -380,7 +380,7 @@ try to access a list member that
does not exist.
.B scons
-requires Python version 1.5.2 or later.
+requires Python version 2.4 or later.
There should be no other dependencies or requirements to run
.B scons.
@@ -591,10 +591,9 @@ Print how many objects are created
of the various classes used internally by SCons
before and after reading the SConscript files
and before and after building targets.
-This is not supported when run under Python versions earlier than 2.1,
-when SCons is executed with the Python
+This is not supported when SCons is executed with the Python
.B -O
-(optimized) option,
+(optimized) option
or when the SCons modules
have been compiled with optimization
(that is, when executing from
@@ -642,7 +641,6 @@ Prints a summary of hits and misses using the Memoizer,
an internal subsystem that counts
how often SCons uses cached values in memory
instead of recomputing them each time they're needed.
-Only available when using Python 2.2 or later.
.TP
--debug=memory
@@ -658,7 +656,6 @@ A deprecated option preserved for backwards compatibility.
--debug=objects
Prints a list of the various objects
of the various classes used internally by SCons.
-This only works when run under Python 2.1 or later.
.TP
--debug=pdb
@@ -1841,9 +1838,7 @@ and a same-named environment method
that split a single string
into a list, separated on
strings of white-space characters.
-(These are similar to the
-string.split() method
-from the standard Python library,
+(These are similar to the split() member function of Python strings
but work even if the input isn't a string.)
Like all Python arguments,
@@ -1862,7 +1857,7 @@ env.Program('bar', env.Split('bar.c foo.c'))
env.Program(source = ['bar.c', 'foo.c'], target = 'bar')
env.Program(target = 'bar', Split('bar.c foo.c'))
env.Program(target = 'bar', env.Split('bar.c foo.c'))
-env.Program('bar', source = string.split('bar.c foo.c'))
+env.Program('bar', source = 'bar.c foo.c'.split())
.EE
Target and source file names
@@ -2273,11 +2268,13 @@ and
Builders by adding them
to the
.B SourceFileScanner
-object as follows:
-
+object.
See the section "Scanner Objects,"
-below, for a more information about
-defining your own Scanner objects.
+below, for more information about
+defining your own Scanner objects
+and using the
+.B SourceFileScanner
+object.
.SS Methods and Functions to Do Things
In addition to Builder methods,
@@ -2448,13 +2445,6 @@ method (with a few additional capabilities noted below);
see the documentation for
.B optparse
for a thorough discussion of its option-processing capabities.
-(Note that although the
-.B optparse
-module was not a standard module until Python 2.3,
-.B scons
-contains a compatible version of the module
-that is used to provide identical functionality
-when run by earlier Python versions.)
In addition to the arguments and values supported by the
.B optparse.add_option ()
@@ -2796,6 +2786,10 @@ is intended to be passed to the
.B SourceCode
function.
+This function is deprecated. For details, see the entry for the
+.B SourceCode
+function.
+
Example:
.ES
@@ -3178,6 +3172,10 @@ replicate part of the repository
directory hierarchy in your
local build directory.
+This function is deprecated. For details, see the entry for the
+.B SourceCode
+function.
+
Examples:
.ES
@@ -3745,7 +3743,7 @@ in the path specified by
.IR dirs .
.I dirs
may be a list of directory names or a single directory name.
-In addition to searching for files that exist in the filesytem,
+In addition to searching for files that exist in the filesystem,
this function also searches for derived files
that have not yet been built.
@@ -4729,6 +4727,10 @@ is intended to be passed to the
.B SourceCode
function.
+This function is deprecated. For details, see the entry for the
+.B SourceCode
+function.
+
Example:
.ES
@@ -4844,7 +4846,7 @@ will overwrite itself on a display:
.ES
import sys
-class ProgressCounter:
+class ProgressCounter(object):
count = 0
def __call__(self, node, *args, **kw):
self.count += 100
@@ -5022,6 +5024,10 @@ is intended to be passed to the
.B SourceCode
function:
+This function is deprecated. For details, see the entry for the
+.B SourceCode
+function.
+
Examples:
.ES
@@ -5190,6 +5196,10 @@ is intended to be passed to the
.B SourceCode
function.
+This function is deprecated. For details, see the entry for the
+.B SourceCode
+function.
+
Example:
.ES
@@ -5502,7 +5512,7 @@ The default is to use a custom
.B SCons.dblite
module that uses pickled
Python data structures,
-and which works on all Python versions from 1.5.2 on.
+and which works on all Python versions.
Examples:
@@ -5534,7 +5544,7 @@ The following statements are equivalent:
.ES
env.SetDefault(FOO = 'foo')
-if not env.has_key('FOO'): env['FOO'] = 'foo'
+if 'FOO' not in env: env['FOO'] = 'foo'
.EE
'\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@@ -5648,6 +5658,13 @@ function.
.RI SourceCode( entries ", " builder )
.TP
.RI env.SourceCode( entries ", " builder )
+This function and its associate factory functions are deprecated.
+There is no replacement.
+The intended use was to keep a local tree in sync with an archive,
+but in actuality the function only causes the archive
+to be fetched on the first run.
+Synchronizing with the archive is best done external to SCons.
+
Arrange for non-existent source files to
be fetched from a source code management system
using the specified
@@ -5836,6 +5853,10 @@ source_nodes = env.subst('$EXPAND_TO_NODELIST',
'\"directory hierarchy in your
'\"local build directory.
'\"
+'\"This function is deprecated. For details, see the entry for the
+'\".B SourceCode
+'\"function.
+'\"
'\"Example:
'\"
'\".ES
@@ -7395,7 +7416,7 @@ vars.Add('CC', 'The C compiler')
def validate_color(key, val, env):
if not val in ['red', 'blue', 'yellow']:
- raise "Invalid color value '%s'" % val
+ raise Exception("Invalid color value '%s'" % val)
vars.Add('COLOR', validator=valid_color)
.EE
@@ -8006,7 +8027,7 @@ may be indicated by a dictionary entry with a key value of None.
.P
.ES
-b = Builder("build_it < $SOURCE > $TARGET"
+b = Builder("build_it < $SOURCE > $TARGET",
prefix = "file-")
def gen_prefix(env, sources):
@@ -9259,7 +9280,7 @@ be associated with the
instantiation of the class:
.ES
-class foo:
+class foo(object):
def __init__(self, arg):
self.arg = arg
@@ -9382,7 +9403,9 @@ You can use the
function to define
objects to scan
new file types for implicit dependencies.
-Scanner accepts the following arguments:
+The
+.B Scanner
+function accepts the following arguments:
.IP function
This can be either:
@@ -9533,6 +9556,7 @@ that should be scanned recursively;
this can be used to select a specific subset of
Nodes for additional scanning.
+.RE
Note that
.B scons
has a global
@@ -9901,7 +9925,7 @@ as follows:
def pf(env, dir, target, source, arg):
top_dir = Dir('#').abspath
results = []
- if env.has_key('MYPATH'):
+ if 'MYPATH' in env:
for p in env['MYPATH']:
results.append(top_dir + os.sep + p)
return results
diff --git a/doc/man/sconsign.1 b/doc/man/sconsign.1
index aed21d7..eb3894c 100644
--- a/doc/man/sconsign.1
+++ b/doc/man/sconsign.1
@@ -19,7 +19,7 @@
.\" OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
.\" WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\"
-.\" doc/man/sconsign.1 4720 2010/03/24 03:14:11 jars
+.\" doc/man/sconsign.1 5023 2010/06/14 22:05:46 scons
.\"
.\" ES - Example Start - indents and turns off line fill
.de ES
@@ -31,7 +31,7 @@
.RE
.fi
..
-.TH SCONSIGN 1 "March 2010"
+.TH SCONSIGN 1 "June 2010"
.SH NAME
sconsign \- print SCons .sconsign file information
.SH SYNOPSIS
diff --git a/doc/python10/abstract.xml b/doc/python10/abstract.xml
index 294180b..45b4918 100644
--- a/doc/python10/abstract.xml
+++ b/doc/python10/abstract.xml
@@ -3,7 +3,7 @@
&SCons; is a software construction tool (build tool, or make tool)
implemented in Python, which uses Python scripts as "configuration
files" for software builds. Based on the design which won the
- Software Carpentry build tool competition, &SCons solves a number of
+ Software Carpentry build tool competition, &SCons; solves a number of
problems associated with other build tools, especially including the
classic and ubiquitous &Make; itself.
diff --git a/doc/python10/design.xml b/doc/python10/design.xml
index cb58af9..0dd5faa 100644
--- a/doc/python10/design.xml
+++ b/doc/python10/design.xml
@@ -6,14 +6,14 @@
<mediaobject>
<imageobject>
- <imagedata fileref="arch" format="eps" align="center">
+ <imagedata fileref="arch" format="eps" align="center"/>
</imageobject>
<imageobject>
- <imagedata fileref="arch.jpg" format="jpg" align="center">
+ <imagedata fileref="arch.jpg" format="jpg" align="center"/>
</imageobject>
<!-- PDF files?
<imageobject>
- <imagedata fileref="arch.pdf" align="center">
+ <imagedata fileref="arch.pdf" align="center"/>
</imageobject>
-->
</mediaobject>
@@ -166,14 +166,14 @@
<mediaobject>
<imageobject>
- <imagedata fileref="node" format="eps" align="center">
+ <imagedata fileref="node" format="eps" align="center"/>
</imageobject>
<imageobject>
- <imagedata fileref="node.jpg" format="jpg" align="center">
+ <imagedata fileref="node.jpg" format="jpg" align="center"/>
</imageobject>
<!-- PDF files?
<imageobject>
- <imagedata fileref="node.pdf" align="center">
+ <imagedata fileref="node.pdf" align="center"/>
</imageobject>
-->
</mediaobject>
@@ -230,14 +230,14 @@
<mediaobject>
<imageobject>
- <imagedata fileref="scanner" format="eps" align="center">
+ <imagedata fileref="scanner" format="eps" align="center"/>
</imageobject>
<imageobject>
- <imagedata fileref="scanner.jpg" format="jpg" align="center">
+ <imagedata fileref="scanner.jpg" format="jpg" align="center"/>
</imageobject>
<!-- PDF files?
<imageobject>
- <imagedata fileref="scanner.pdf" align="center">
+ <imagedata fileref="scanner.pdf" align="center"/>
</imageobject>
-->
</mediaobject>
@@ -264,7 +264,7 @@
signature information for &Node; objects.
The signature subsystem in &SCons;
supports multiple ways to
- determine whether a &Node is up-to-date
+ determine whether a &Node; is up-to-date
by using an abstract &Sig; class
as a strategy wrapper:
@@ -272,14 +272,14 @@
<mediaobject>
<imageobject>
- <imagedata fileref="sig" format="eps" align="center">
+ <imagedata fileref="sig" format="eps" align="center"/>
</imageobject>
<imageobject>
- <imagedata fileref="sig.jpg" format="jpg" align="center">
+ <imagedata fileref="sig.jpg" format="jpg" align="center"/>
</imageobject>
<!-- PDF files?
<imageobject>
- <imagedata fileref="sig.pdf" align="center">
+ <imagedata fileref="sig.pdf" align="center"/>
</imageobject>
-->
</mediaobject>
@@ -328,14 +328,14 @@
<mediaobject>
<imageobject>
- <imagedata fileref="builder" format="eps" align="center">
+ <imagedata fileref="builder" format="eps" align="center"/>
</imageobject>
<imageobject>
- <imagedata fileref="builder.jpg" format="jpg" align="center">
+ <imagedata fileref="builder.jpg" format="jpg" align="center"/>
</imageobject>
<!-- PDF files?
<imageobject>
- <imagedata fileref="builder.pdf" align="center">
+ <imagedata fileref="builder.pdf" align="center"/>
</imageobject>
-->
</mediaobject>
@@ -391,14 +391,14 @@
<mediaobject>
<imageobject>
- <imagedata fileref="job-task" format="eps" align="center">
+ <imagedata fileref="job-task" format="eps" align="center"/>
</imageobject>
<imageobject>
- <imagedata fileref="job-task.jpg" format="jpg" align="center">
+ <imagedata fileref="job-task.jpg" format="jpg" align="center"/>
</imageobject>
<!-- PDF files?
<imageobject>
- <imagedata fileref="job-task.pdf" align="center">
+ <imagedata fileref="job-task.pdf" align="center"/>
</imageobject>
-->
</mediaobject>
@@ -435,7 +435,7 @@
<para>
- The &Taskmaster uses the node subsystem's
+ The &Taskmaster; uses the node subsystem's
&Walker; class to walk the dependency tree,
and the &Sig; class to use the
appropriate method
@@ -629,8 +629,8 @@
<para>
&Builder; objects are associated with a &consenv; through a
- &consvar; named &BUILDERS;, a list of the &Builder objects that
- will be available for execution through the &consenv:
+ &consvar; named &BUILDERS;, a list of the &Builder; objects that
+ will be available for execution through the &consenv;:
</para>
@@ -679,7 +679,7 @@
&Scanner; objects are associated with a &consenv; through a
&consvar; named &SCANNERS;, a list of the &Scanner; objects that
- will be available through the &consenv:
+ will be available through the &consenv;:
</para>
@@ -818,10 +818,10 @@
The most noticeable difference between &scons; and &Make;, or most
other build tools, is that the configuration files are actually
Python scripts, generically called "SConscripts" (although the
- top-level "Makefile" is named &SConstruct). Users do not have to
+ top-level "Makefile" is named &SConstruct;). Users do not have to
learn a new language syntax, but instead configure dependency
information by making direct calls to the Python API of the
- &SCons; Build Engine. Here is an example &SConstruct file which
+ &SCons; Build Engine. Here is an example &SConstruct; file which
builds a program in side-by-side normal and debug versions:
</para>
diff --git a/doc/python10/main.xml b/doc/python10/main.xml
index 42bc4af..e061b90 100644
--- a/doc/python10/main.xml
+++ b/doc/python10/main.xml
@@ -182,7 +182,7 @@
<holder>O'Reilly &amp; Associates, Inc.</holder>
</copyright>
<publisher>
- <publishername>O'Reilly & Associates, Inc.</publishername>
+ <publishername>O'Reilly &amp; Associates, Inc.</publishername>
</publisher>
<title>Managing Projects with Make, 2nd Ed.</title>
</biblioentry>
diff --git a/doc/python10/process.xml b/doc/python10/process.xml
index f1b2479..4ff0ab1 100644
--- a/doc/python10/process.xml
+++ b/doc/python10/process.xml
@@ -13,7 +13,7 @@
<listitem>
<para>
- &SCons; will be written to Python version 1.5.2 (to ensure
+ &SCons; will be written to Python version 2.4 (to ensure
usability by a wide install base).
</para>
@@ -181,7 +181,7 @@
<para>
- In practice, these restrictions can be overridden as necessary­for
+ In practice, these restrictions can be overridden as necessary--for
example, when changing comments or documentation.
</para>
diff --git a/doc/scons.mod b/doc/scons.mod
index b500101..b1993d4 100644
--- a/doc/scons.mod
+++ b/doc/scons.mod
@@ -157,6 +157,7 @@
<!ENTITY AddVariables "<function>AddVariables</function>">
<!ENTITY Alias "<function>Alias</function>">
<!ENTITY Aliases "<function>Aliases</function>">
+<!ENTITY AllowSubstExceptions "<function>AllowSubstExceptions</function>">
<!ENTITY AlwaysBuild "<function>AlwaysBuild</function>">
<!ENTITY Append "<function>Append</function>">
<!ENTITY AppendENVPath "<function>AppendENVPath</function>">
@@ -191,10 +192,12 @@
<!ENTITY File "<function>File</function>">
<!ENTITY FindFile "<function>FindFile</function>">
<!ENTITY FindInstalledFiles "<function>FindInstalledFiles</function>">
+<!ENTITY FindPathDirs "<function>FindPathDirs</function>">
<!ENTITY Finish "<function>Finish</function>">
<!ENTITY Flatten "<function>Flatten</function>">
<!ENTITY GenerateHelpText "<function>GenerateHelpText</function>">
<!ENTITY GetBuildFailures "<function>GetBuildFailures</function>">
+<!ENTITY GetBuildPath "<function>GetBuildPath</function>">
<!ENTITY GetLaunchDir "<function>GetLaunchDir</function>">
<!ENTITY GetOption "<function>GetOption</function>">
<!ENTITY Glob "<function>Glob</function>">
@@ -279,7 +282,9 @@
<!ENTITY TryRun "<function>TryRun</function>">
-<!-- Python functions -->
+<!-- Python functions and classes -->
+<!ENTITY IndexError "<classname>IndexError</classname>">
+<!ENTITY NameError "<classname>NameError</classname>">
<!ENTITY str "<function>str</function>">
<!ENTITY zipfile "<function>zipfile</function>">
diff --git a/doc/user/actions.in b/doc/user/actions.in
index 3f91c67..06dcd63 100644
--- a/doc/user/actions.in
+++ b/doc/user/actions.in
@@ -245,7 +245,7 @@ solutions to the above limitations.
</para>
<sconstruct>
- b = Builder(action = 'build < $SOURCE > $TARGET')
+ b = Builder(action = 'build &lt; $SOURCE &gt; $TARGET')
</sconstruct>
<para>
@@ -255,7 +255,7 @@ solutions to the above limitations.
</para>
<sconstruct>
- b = Builder(action = Action('build < $SOURCE > $TARGET'))
+ b = Builder(action = Action('build &lt; $SOURCE &gt; $TARGET'))
</sconstruct>
<para>
diff --git a/doc/user/actions.xml b/doc/user/actions.xml
index f969698..7231a70 100644
--- a/doc/user/actions.xml
+++ b/doc/user/actions.xml
@@ -245,7 +245,7 @@ solutions to the above limitations.
</para>
<programlisting>
- b = Builder(action = 'build < $SOURCE > $TARGET')
+ b = Builder(action = 'build &lt; $SOURCE &gt; $TARGET')
</programlisting>
<para>
@@ -255,7 +255,7 @@ solutions to the above limitations.
</para>
<programlisting>
- b = Builder(action = Action('build < $SOURCE > $TARGET'))
+ b = Builder(action = Action('build &lt; $SOURCE &gt; $TARGET'))
</programlisting>
<para>
diff --git a/doc/user/build-install.in b/doc/user/build-install.in
index 577c140..05ead9d 100644
--- a/doc/user/build-install.in
+++ b/doc/user/build-install.in
@@ -111,17 +111,6 @@
<para>
- (Note that the <option>-V</option> option
- was added to Python version 2.0,
- so if your system only has an earlier version available
- you may see an
- <literal>"Unknown option: -V"</literal>
- error message.)
-
- </para>
-
- <para>
-
The standard location for information
about downloading and installing Python is
<ulink url="http://www.python.org/download/">http://www.python.org/download/</ulink>.
@@ -132,10 +121,10 @@
<para>
- &SCons; will work with any version of Python from 1.5.2 or later.
+ &SCons; will work with any version of Python from 2.4 or later.
If you need to install Python and have a choice,
- we recommend using the most recent Python 2.5 version available.
- Python 2.5 has significant improvements
+ we recommend using the most recent Python version available.
+ Newer Pythons have significant improvements
that help speed up the performance of &SCons;.
</para>
@@ -209,7 +198,7 @@
</para>
<screen>
- # <userinput>rpm -Uvh scons-1.3.0-1.noarch.rpm</userinput>
+ # <userinput>rpm -Uvh scons-2.0.0.final.0-1.noarch.rpm</userinput>
</screen>
<para>
@@ -271,7 +260,7 @@
&SCons; provides a Windows installer
that makes installation extremely easy.
- Download the <filename>scons-1.3.0.win32.exe</filename>
+ Download the <filename>scons-2.0.0.final.0.win32.exe</filename>
file from the &SCons; download page at
<ulink url="http://www.scons.org/download.php">http://www.scons.org/download.php</ulink>.
Then all you need to do is execute the file
@@ -381,8 +370,8 @@
<para>
The first step is to download either the
- <filename>scons-1.3.0.tar.gz</filename>
- or <filename>scons-1.3.0.zip</filename>,
+ <filename>scons-2.0.0.final.0.tar.gz</filename>
+ or <filename>scons-2.0.0.final.0.zip</filename>,
which are available from the SCons download page at
<ulink url="http://www.scons.org/download.html">http://www.scons.org/download.html</ulink>.
@@ -395,7 +384,7 @@
on Linux or UNIX,
or <application>WinZip</application> on Windows.
This will create a directory called
- <filename>scons-1.3.0</filename>,
+ <filename>scons-2.0.0.final.0</filename>,
usually in your local directory.
Then change your working directory to that directory
and install &SCons; by executing the following commands:
@@ -403,7 +392,7 @@
</para>
<screen>
- # <userinput>cd scons-1.3.0</userinput>
+ # <userinput>cd scons-2.0.0.final.0</userinput>
# <userinput>python setup.py install</userinput>
</screen>
@@ -471,9 +460,9 @@
This will install the &SCons; build engine
in the
- <filename>/usr/lib/scons-1.3.0</filename>
+ <filename>/usr/lib/scons-2.0.0.final.0</filename>
or
- <filename>C:\Python25\scons-1.3.0</filename>
+ <filename>C:\Python25\scons-2.0.0.final.0</filename>
directory, for example.
</para>
@@ -530,7 +519,7 @@
relative to the specified prefix.
Adding <option>--version-lib</option> to the
above example would install the build engine in
- <filename>/opt/scons/lib/scons-1.3.0</filename>.
+ <filename>/opt/scons/lib/scons-2.0.0.final.0</filename>.
</para>
diff --git a/doc/user/build-install.xml b/doc/user/build-install.xml
index 577c140..05ead9d 100644
--- a/doc/user/build-install.xml
+++ b/doc/user/build-install.xml
@@ -111,17 +111,6 @@
<para>
- (Note that the <option>-V</option> option
- was added to Python version 2.0,
- so if your system only has an earlier version available
- you may see an
- <literal>"Unknown option: -V"</literal>
- error message.)
-
- </para>
-
- <para>
-
The standard location for information
about downloading and installing Python is
<ulink url="http://www.python.org/download/">http://www.python.org/download/</ulink>.
@@ -132,10 +121,10 @@
<para>
- &SCons; will work with any version of Python from 1.5.2 or later.
+ &SCons; will work with any version of Python from 2.4 or later.
If you need to install Python and have a choice,
- we recommend using the most recent Python 2.5 version available.
- Python 2.5 has significant improvements
+ we recommend using the most recent Python version available.
+ Newer Pythons have significant improvements
that help speed up the performance of &SCons;.
</para>
@@ -209,7 +198,7 @@
</para>
<screen>
- # <userinput>rpm -Uvh scons-1.3.0-1.noarch.rpm</userinput>
+ # <userinput>rpm -Uvh scons-2.0.0.final.0-1.noarch.rpm</userinput>
</screen>
<para>
@@ -271,7 +260,7 @@
&SCons; provides a Windows installer
that makes installation extremely easy.
- Download the <filename>scons-1.3.0.win32.exe</filename>
+ Download the <filename>scons-2.0.0.final.0.win32.exe</filename>
file from the &SCons; download page at
<ulink url="http://www.scons.org/download.php">http://www.scons.org/download.php</ulink>.
Then all you need to do is execute the file
@@ -381,8 +370,8 @@
<para>
The first step is to download either the
- <filename>scons-1.3.0.tar.gz</filename>
- or <filename>scons-1.3.0.zip</filename>,
+ <filename>scons-2.0.0.final.0.tar.gz</filename>
+ or <filename>scons-2.0.0.final.0.zip</filename>,
which are available from the SCons download page at
<ulink url="http://www.scons.org/download.html">http://www.scons.org/download.html</ulink>.
@@ -395,7 +384,7 @@
on Linux or UNIX,
or <application>WinZip</application> on Windows.
This will create a directory called
- <filename>scons-1.3.0</filename>,
+ <filename>scons-2.0.0.final.0</filename>,
usually in your local directory.
Then change your working directory to that directory
and install &SCons; by executing the following commands:
@@ -403,7 +392,7 @@
</para>
<screen>
- # <userinput>cd scons-1.3.0</userinput>
+ # <userinput>cd scons-2.0.0.final.0</userinput>
# <userinput>python setup.py install</userinput>
</screen>
@@ -471,9 +460,9 @@
This will install the &SCons; build engine
in the
- <filename>/usr/lib/scons-1.3.0</filename>
+ <filename>/usr/lib/scons-2.0.0.final.0</filename>
or
- <filename>C:\Python25\scons-1.3.0</filename>
+ <filename>C:\Python25\scons-2.0.0.final.0</filename>
directory, for example.
</para>
@@ -530,7 +519,7 @@
relative to the specified prefix.
Adding <option>--version-lib</option> to the
above example would install the build engine in
- <filename>/opt/scons/lib/scons-1.3.0</filename>.
+ <filename>/opt/scons/lib/scons-2.0.0.final.0</filename>.
</para>
diff --git a/doc/user/builders-built-in.in b/doc/user/builders-built-in.in
index 2c3045b..f7da806 100644
--- a/doc/user/builders-built-in.in
+++ b/doc/user/builders-built-in.in
@@ -838,19 +838,6 @@
<scons_output_command>scons -Q .</scons_output_command>
</scons_output>
- <para>
-
- If you're using Python version 1.5.2 to run &SCons;,
- then &SCons; will try to use an external
- &zip; program as follows:
-
- </para>
-
- <screen>
- % <userinput>scons -Q .</userinput>
- zip /home/my/project/zip.out file1 file2
- </screen>
-
</section>
</section>
diff --git a/doc/user/builders-built-in.xml b/doc/user/builders-built-in.xml
index a947f8b..3d47f5c 100644
--- a/doc/user/builders-built-in.xml
+++ b/doc/user/builders-built-in.xml
@@ -812,19 +812,6 @@
zip(["out.zip"], ["file1", "file2"])
</screen>
- <para>
-
- If you're using Python version 1.5.2 to run &SCons;,
- then &SCons; will try to use an external
- &zip; program as follows:
-
- </para>
-
- <screen>
- % <userinput>scons -Q .</userinput>
- zip /home/my/project/zip.out file1 file2
- </screen>
-
</section>
</section>
diff --git a/doc/user/builders-writing.in b/doc/user/builders-writing.in
index fda83cd..0bf6971 100644
--- a/doc/user/builders-writing.in
+++ b/doc/user/builders-writing.in
@@ -129,7 +129,7 @@ This functionality could be invoked as in the following example:
</para>
<programlisting>
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
</programlisting>
<para>
@@ -165,7 +165,7 @@ This functionality could be invoked as in the following example:
<scons_example name="ex1">
<file name="SConstruct">
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
env = Environment(BUILDERS = {'Foo' : bld})
import os
env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd()
@@ -180,7 +180,7 @@ This functionality could be invoked as in the following example:
</scons_example>
<sconstruct>
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
env = Environment(BUILDERS = {'Foo' : bld})
</sconstruct>
@@ -276,7 +276,7 @@ This functionality could be invoked as in the following example:
env = Environment()
import os
env['ENV']['PATH'] = env['ENV']['PATH'] + os.pathsep + os.getcwd()
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
env.Append(BUILDERS = {'Foo' : bld})
env.Foo('file.foo', 'file.input')
env.Program('hello.c')
@@ -294,7 +294,7 @@ This functionality could be invoked as in the following example:
<sconstruct>
env = Environment()
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
env.Append(BUILDERS = {'Foo' : bld})
env.Foo('file.foo', 'file.input')
env.Program('hello.c')
@@ -309,7 +309,7 @@ This functionality could be invoked as in the following example:
<sconstruct>
env = Environment()
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
env['BUILDERS']['Foo'] = bld
env.Foo('file.foo', 'file.input')
env.Program('hello.c')
@@ -352,7 +352,7 @@ This functionality could be invoked as in the following example:
<scons_example name="ex4">
<file name="SConstruct">
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET',
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET',
suffix = '.foo',
src_suffix = '.input')
env = Environment(BUILDERS = {'Foo' : bld})
@@ -373,7 +373,7 @@ This functionality could be invoked as in the following example:
</scons_example>
<sconstruct>
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET',
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET',
suffix = '.foo',
src_suffix = '.input')
env = Environment(BUILDERS = {'Foo' : bld})
@@ -544,7 +544,7 @@ This functionality could be invoked as in the following example:
<programlisting>
def generate_actions(source, target, env, for_signature):
- return 'foobuild < %s > %s' % (target[0], source[0])
+ return 'foobuild &lt; %s &gt; %s' % (target[0], source[0])
</programlisting>
<para>
@@ -647,7 +647,7 @@ This functionality could be invoked as in the following example:
<scons_example name="ex6">
<file name="SConstruct">
def generate_actions(source, target, env, for_signature):
- return 'foobuild < %s > %s' % (source[0], target[0])
+ return 'foobuild &lt; %s &gt; %s' % (source[0], target[0])
bld = Builder(generator = generate_actions,
suffix = '.foo',
src_suffix = '.input')
@@ -666,7 +666,7 @@ This functionality could be invoked as in the following example:
<sconstruct>
def generate_actions(source, target, env, for_signature):
- return 'foobuild < %s > %s' % (source[0], target[0])
+ return 'foobuild &lt; %s &gt; %s' % (source[0], target[0])
bld = Builder(generator = generate_actions,
suffix = '.foo',
src_suffix = '.input')
@@ -790,7 +790,7 @@ This functionality could be invoked as in the following example:
<scons_example name="MY_EMITTER">
<file name="SConstruct" printme="1">
- bld = Builder(action = 'my_command $SOURCES > $TARGET',
+ bld = Builder(action = 'my_command $SOURCES &gt; $TARGET',
suffix = '.foo',
src_suffix = '.input',
emitter = '$MY_EMITTER')
@@ -828,7 +828,7 @@ This functionality could be invoked as in the following example:
</scons_example>
<sconstruct>
- bld = Builder(action = 'my_command $SOURCES > $TARGET',
+ bld = Builder(action = 'my_command $SOURCES &gt; $TARGET',
suffix = '.foo',
src_suffix = '.input',
emitter = '$MY_EMITTER')
@@ -934,8 +934,8 @@ This functionality could be invoked as in the following example:
<file name="site_scons/site_init.py" printme=1>
def TOOL_ADD_HEADER(env):
"""A Tool to add a header from $HEADER to the source file"""
- add_header = Builder(action=['echo "$HEADER" > $TARGET',
- 'cat $SOURCE >> $TARGET'])
+ add_header = Builder(action=['echo "$HEADER" &gt; $TARGET',
+ 'cat $SOURCE &gt;&gt; $TARGET'])
env.Append(BUILDERS = {'AddHeader' : add_header})
env['HEADER'] = '' # set default value
</file>
diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml
index 5c01934..f364e27 100644
--- a/doc/user/builders-writing.xml
+++ b/doc/user/builders-writing.xml
@@ -166,7 +166,7 @@ This functionality could be invoked as in the following example:
<programlisting>
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
env = Environment(BUILDERS = {'Foo' : bld})
</programlisting>
@@ -233,7 +233,7 @@ This functionality could be invoked as in the following example:
<screen>
% <userinput>scons -Q</userinput>
- AttributeError: SConsEnvironment instance has no attribute 'Program':
+ AttributeError: 'SConsEnvironment' object has no attribute 'Program':
File "/home/my/project/SConstruct", line 4:
env.Program('hello.c')
</screen>
@@ -251,7 +251,7 @@ This functionality could be invoked as in the following example:
<programlisting>
env = Environment()
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
env.Append(BUILDERS = {'Foo' : bld})
env.Foo('file.foo', 'file.input')
env.Program('hello.c')
@@ -266,7 +266,7 @@ This functionality could be invoked as in the following example:
<programlisting>
env = Environment()
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET')
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET')
env['BUILDERS']['Foo'] = bld
env.Foo('file.foo', 'file.input')
env.Program('hello.c')
@@ -313,7 +313,7 @@ This functionality could be invoked as in the following example:
<programlisting>
- bld = Builder(action = 'foobuild < $SOURCE > $TARGET',
+ bld = Builder(action = 'foobuild &lt; $SOURCE &gt; $TARGET',
suffix = '.foo',
src_suffix = '.input')
env = Environment(BUILDERS = {'Foo' : bld})
@@ -586,7 +586,7 @@ This functionality could be invoked as in the following example:
<programlisting>
def generate_actions(source, target, env, for_signature):
- return 'foobuild < %s > %s' % (source[0], target[0])
+ return 'foobuild &lt; %s &gt; %s' % (source[0], target[0])
bld = Builder(generator = generate_actions,
suffix = '.foo',
src_suffix = '.input')
@@ -708,7 +708,7 @@ This functionality could be invoked as in the following example:
</programlisting>
<programlisting>
- bld = Builder(action = 'my_command $SOURCES > $TARGET',
+ bld = Builder(action = 'my_command $SOURCES &gt; $TARGET',
suffix = '.foo',
src_suffix = '.input',
emitter = '$MY_EMITTER')
diff --git a/doc/user/command-line.in b/doc/user/command-line.in
index d910546..cd5ead6 100644
--- a/doc/user/command-line.in
+++ b/doc/user/command-line.in
@@ -943,8 +943,8 @@
These older names still work,
and you may encounter them in older
&SConscript; fles,
- but their use is discouraged
- and will be officially deprecated some day.
+ but they have been officially deprecated
+ as of &SCons; version 2.0.
</para>
@@ -1237,7 +1237,7 @@
choices to a specific set of allowed colors.
This can be set up quite easily
using the &EnumVariable;,
- which takes a list of &allowed_values
+ which takes a list of &allowed_values;
in addition to the variable name,
default value,
and help text arguments:
@@ -2154,7 +2154,7 @@
&SCons; supports a &DEFAULT_TARGETS; variable
that lets you get at the current list of default targets.
- The &DEFAULT_TARGETS variable has
+ The &DEFAULT_TARGETS; variable has
two important differences from the &COMMAND_LINE_TARGETS; variable.
First, the &DEFAULT_TARGETS; variable is a list of
internal &SCons; nodes,
diff --git a/doc/user/command-line.xml b/doc/user/command-line.xml
index 21b52dd..8bc72bb 100644
--- a/doc/user/command-line.xml
+++ b/doc/user/command-line.xml
@@ -926,8 +926,8 @@
These older names still work,
and you may encounter them in older
&SConscript; fles,
- but their use is discouraged
- and will be officially deprecated some day.
+ but they have been officially deprecated
+ as of &SCons; version 2.0.
</para>
@@ -1208,7 +1208,7 @@
choices to a specific set of allowed colors.
This can be set up quite easily
using the &EnumVariable;,
- which takes a list of &allowed_values
+ which takes a list of &allowed_values;
in addition to the variable name,
default value,
and help text arguments:
@@ -2064,7 +2064,7 @@
&SCons; supports a &DEFAULT_TARGETS; variable
that lets you get at the current list of default targets.
- The &DEFAULT_TARGETS variable has
+ The &DEFAULT_TARGETS; variable has
two important differences from the &COMMAND_LINE_TARGETS; variable.
First, the &DEFAULT_TARGETS; variable is a list of
internal &SCons; nodes,
diff --git a/doc/user/depends.in b/doc/user/depends.in
index 213713f..69bb242 100644
--- a/doc/user/depends.in
+++ b/doc/user/depends.in
@@ -672,13 +672,14 @@
&SCons; still supports two functions that used to be the
primary methods for configuring the
decision about whether or not an input file has changed.
- Although they're not officially deprecated yet,
- their use is discouraged,
+ These functions have been officially deprecated
+ as &SCons; version 2.0,
+ and their use is discouraged,
mainly because they rely on a somewhat
confusing distinction between how
source files and target files are handled.
These functions are documented here mainly in case you
- encounter them in existing &SConscript; files.
+ encounter them in older &SConscript; files.
</para>
diff --git a/doc/user/depends.xml b/doc/user/depends.xml
index d386a1f..430e64a 100644
--- a/doc/user/depends.xml
+++ b/doc/user/depends.xml
@@ -661,13 +661,14 @@
&SCons; still supports two functions that used to be the
primary methods for configuring the
decision about whether or not an input file has changed.
- Although they're not officially deprecated yet,
- their use is discouraged,
+ These functions have been officially deprecated
+ as &SCons; version 2.0,
+ and their use is discouraged,
mainly because they rely on a somewhat
confusing distinction between how
source files and target files are handled.
These functions are documented here mainly in case you
- encounter them in existing &SConscript; files.
+ encounter them in older &SConscript; files.
</para>
diff --git a/doc/user/environments.in b/doc/user/environments.in
index dfe98f2..9ce5568 100644
--- a/doc/user/environments.in
+++ b/doc/user/environments.in
@@ -672,11 +672,8 @@ environment, of directory names, suffixes, etc.
<sconstruct>
env = Environment()
- dict = env.Dictionary()
- keys = dict.keys()
- keys.sort()
- for key in keys:
- print "construction variable = '%s', value = '%s'" % (key, dict[key])
+ for item in sorted(env.Dictionary().items()):
+ print "construction variable = '%s', value = '%s'" % item
</sconstruct>
</section>
@@ -775,6 +772,82 @@ environment, of directory names, suffixes, etc.
</section>
<section>
+ <title>Handling Problems With Value Expansion</title>
+
+ <para>
+
+ If a problem occurs when expanding a construction variable,
+ by default it is expanded to <literal>''</literal>
+ (a null string), and will not cause scons to fail.
+
+ <scons_example name="missing1">
+ <file name="SConstruct" printme="1">
+ env = Environment()
+ print "value is:", env.subst( '->$MISSING<-' )
+ </file>
+ </scons_example>
+
+ <scons_output example="missing1">
+ <scons_output_command>scons -Q</scons_output_command>
+ </scons_output>
+
+ This default behaviour can be changed using the &AllowSubstExceptions;
+ function.
+ When a problem occurs with a variable expansion it generates
+ an exception, and the &AllowSubstExceptions; function controls
+ which of these exceptions are actually fatal and which are
+ allowed to occur safely. By default, &NameError; and &IndexError;
+ are the two exceptions that are allowed to occur: so instead of
+ causing scons to fail, these are caught, the variable expanded to
+ <literal>''</literal>
+ and scons execution continues.
+ To require that all construction variable names exist, and that
+ indexes out of range are not allowed, call &AllowSubstExceptions;
+ with no extra arguments.
+ </para>
+
+ <scons_example name="missing2">
+ <file name="SConstruct" printme="1">
+ AllowSubstExceptions()
+ env = Environment()
+ print "value is:", env.subst( '->$MISSING<-' )
+ </file>
+ </scons_example>
+
+ <scons_output example="missing2">
+ <scons_output_command>scons -Q</scons_output_command>
+ </scons_output>
+
+ <para>
+ This can also be used to allow other exceptions that might occur,
+ most usefully with the <literal>${...}</literal> construction
+ variable syntax. For example, this would allow zero-division to
+ occur in a variable expansion in addition to the default exceptions
+ allowed
+ </para>
+
+ <scons_example name="missing3">
+ <file name="SConstruct" printme="1">
+ AllowSubstExceptions(IndexError, NameError, ZeroDivisionError)
+ env = Environment()
+ print "value is:", env.subst( '->${1 / 0}<-' )
+ </file>
+ </scons_example>
+
+ <scons_output example="missing3">
+ <scons_output_command>scons -Q</scons_output_command>
+ </scons_output>
+ <sconstruct>
+ </sconstruct>
+
+ <para>
+ If &AllowSubstExceptions; is called multiple times, each call
+ completely overwrites the previous list of allowed exceptions.
+ </para>
+
+ </section>
+
+ <section>
<title>Controlling the Default &ConsEnv;: the &DefaultEnvironment; Function</title>
<para>
@@ -1556,11 +1629,10 @@ environment, of directory names, suffixes, etc.
#!/usr/bin/env python
import os
import sys
- if len(sys.argv) > 1:
+ if len(sys.argv) &gt; 1:
keys = sys.argv[1:]
else:
- keys = os.environ.keys()
- keys.sort()
+ keys = sorted(os.environ.keys())
for key in keys:
print " " + key + "=" + os.environ[key]
</file>
diff --git a/doc/user/environments.xml b/doc/user/environments.xml
index fafb120..5bb1089 100644
--- a/doc/user/environments.xml
+++ b/doc/user/environments.xml
@@ -672,11 +672,8 @@ environment, of directory names, suffixes, etc.
<programlisting>
env = Environment()
- dict = env.Dictionary()
- keys = dict.keys()
- keys.sort()
- for key in keys:
- print "construction variable = '%s', value = '%s'" % (key, dict[key])
+ for item in sorted(env.Dictionary().items()):
+ print "construction variable = '%s', value = '%s'" % item
</programlisting>
</section>
@@ -775,6 +772,83 @@ environment, of directory names, suffixes, etc.
</section>
<section>
+ <title>Handling Problems With Value Expansion</title>
+
+ <para>
+
+ If a problem occurs when expanding a construction variable,
+ by default it is expanded to <literal>''</literal>
+ (a null string), and will not cause scons to fail.
+
+ <programlisting>
+ env = Environment()
+ print "value is:", env.subst( '-&gt;$MISSING&lt;-' )
+ </programlisting>
+
+ <screen>
+ % <userinput>scons -Q</userinput>
+ value is: -&gt;&lt;-
+ scons: `.' is up to date.
+ </screen>
+
+ This default behaviour can be changed using the &AllowSubstExceptions;
+ function.
+ When a problem occurs with a variable expansion it generates
+ an exception, and the &AllowSubstExceptions; function controls
+ which of these exceptions are actually fatal and which are
+ allowed to occur safely. By default, &NameError; and &IndexError;
+ are the two exceptions that are allowed to occur: so instead of
+ causing scons to fail, these are caught, the variable expanded to
+ <literal>''</literal>
+ and scons execution continues.
+ To require that all construction variable names exist, and that
+ indexes out of range are not allowed, call &AllowSubstExceptions;
+ with no extra arguments.
+ </para>
+
+ <programlisting>
+ AllowSubstExceptions()
+ env = Environment()
+ print "value is:", env.subst( '-&gt;$MISSING&lt;-' )
+ </programlisting>
+
+ <screen>
+ % <userinput>scons -Q</userinput>
+ value is:
+ scons: *** NameError `MISSING' trying to evaluate `$MISSING'
+ File "/home/my/project/SConstruct", line 3, in &lt;module&gt;
+ </screen>
+
+ <para>
+ This can also be used to allow other exceptions that might occur,
+ most usefully with the <literal>${...}</literal> construction
+ variable syntax. For example, this would allow zero-division to
+ occur in a variable expansion in addition to the default exceptions
+ allowed
+ </para>
+
+ <programlisting>
+ AllowSubstExceptions(IndexError, NameError, ZeroDivisionError)
+ env = Environment()
+ print "value is:", env.subst( '-&gt;${1 / 0}&lt;-' )
+ </programlisting>
+
+ <screen>
+ % <userinput>scons -Q</userinput>
+ value is: -&gt;&lt;-
+ scons: `.' is up to date.
+ </screen>
+ <programlisting>
+ </programlisting>
+
+ <para>
+ If &AllowSubstExceptions; is called multiple times, each call
+ completely overwrites the previous list of allowed exceptions.
+ </para>
+
+ </section>
+
+ <section>
<title>Controlling the Default &ConsEnv;: the &DefaultEnvironment; Function</title>
<para>
@@ -1543,11 +1617,10 @@ environment, of directory names, suffixes, etc.
#!/usr/bin/env python
import os
import sys
- if len(sys.argv) > 1:
+ if len(sys.argv) &gt; 1:
keys = sys.argv[1:]
else:
- keys = os.environ.keys()
- keys.sort()
+ keys = sorted(os.environ.keys())
for key in keys:
print " " + key + "=" + os.environ[key]
</file>
diff --git a/doc/user/less-simple.in b/doc/user/less-simple.in
index 4cd00e9..cccad83 100644
--- a/doc/user/less-simple.in
+++ b/doc/user/less-simple.in
@@ -371,7 +371,7 @@
you'll have realized that this is similar to the
<function>split()</function> method
in the Python standard <function>string</function> module.
- Unlike the <function>string.split()</function> method,
+ Unlike the <function>split()</function> member function of strings,
however, the &Split; function
does not require a string as input
and will wrap up a single non-string object in a list,
diff --git a/doc/user/less-simple.xml b/doc/user/less-simple.xml
index 17ce181..24b45e6 100644
--- a/doc/user/less-simple.xml
+++ b/doc/user/less-simple.xml
@@ -360,7 +360,7 @@
you'll have realized that this is similar to the
<function>split()</function> method
in the Python standard <function>string</function> module.
- Unlike the <function>string.split()</function> method,
+ Unlike the <function>split()</function> member function of strings,
however, the &Split; function
does not require a string as input
and will wrap up a single non-string object in a list,
diff --git a/doc/user/main.in b/doc/user/main.in
index be4fd21..fbc28df 100644
--- a/doc/user/main.in
+++ b/doc/user/main.in
@@ -96,14 +96,7 @@
<!--
- XXX FindFile()
- XXX FindPathDirs()
- XXX GetBuildPath()
- XXX GetLaunchDir()
-
- XXX ParseDepends()
XXX Platform()
- XXX SConsignFile()
XXX Tools()
XXX GetOption('duplicate')
@@ -129,10 +122,10 @@
<edition>Revision &buildrevision; (&builddate;)</edition>
- <pubdate>2004, 2005, 2006, 2007, 2008</pubdate>
+ <pubdate>2004, 2005, 2006, 2007, 2008, 2009, 2010</pubdate>
<copyright>
- <year>2004, 2005, 2006, 2007, 2008</year>
+ <year>2004, 2005, 2006, 2007, 2008, 2009, 2010</year>
<holder>Steven Knight</holder>
</copyright>
diff --git a/doc/user/main.xml b/doc/user/main.xml
index be4fd21..00b8268 100644
--- a/doc/user/main.xml
+++ b/doc/user/main.xml
@@ -96,14 +96,7 @@
<!--
- XXX FindFile()
- XXX FindPathDirs()
- XXX GetBuildPath()
- XXX GetLaunchDir()
-
- XXX ParseDepends()
XXX Platform()
- XXX SConsignFile()
XXX Tools()
XXX GetOption('duplicate')
diff --git a/doc/user/misc.in b/doc/user/misc.in
index 3116fd3..87b5db4 100644
--- a/doc/user/misc.in
+++ b/doc/user/misc.in
@@ -36,10 +36,10 @@
<para>
Although the &SCons; code itself will run
- on any Python version 1.5.2 or later,
+ on any Python version 2.4 or later,
you are perfectly free to make use of
Python syntax and modules from more modern versions
- (for example, Python 2.4 or 2.5)
+ (for example, Python 2.5 or 2.6)
when writing your &SConscript; files
or your own local modules.
If you do this, it's usually helpful to
diff --git a/doc/user/misc.xml b/doc/user/misc.xml
index 043b5a2..f79f1cc 100644
--- a/doc/user/misc.xml
+++ b/doc/user/misc.xml
@@ -36,10 +36,10 @@
<para>
Although the &SCons; code itself will run
- on any Python version 1.5.2 or later,
+ on any Python version 2.4 or later,
you are perfectly free to make use of
Python syntax and modules from more modern versions
- (for example, Python 2.4 or 2.5)
+ (for example, Python 2.5 or 2.6)
when writing your &SConscript; files
or your own local modules.
If you do this, it's usually helpful to
@@ -253,7 +253,7 @@
<screen>
% <userinput>scons -Q</userinput>
None
- SCons.Node.FS.File exists
+ &lt;class 'SCons.Node.FS.File'&gt; exists
scons: `.' is up to date.
</screen>
diff --git a/doc/user/nodes.in b/doc/user/nodes.in
index e583ea9..c65a2ad 100644
--- a/doc/user/nodes.in
+++ b/doc/user/nodes.in
@@ -332,6 +332,51 @@
</section>
+ <section>
+ <title>&GetBuildPath;: Getting the Path From a &Node; or String</title>
+
+ <para>
+
+ <function>env.GetBuildPath(file_or_list)</function>
+ returns the path of a &Node; or a string representing a
+ path. It can also take a list of &Node;s and/or strings, and
+ returns the list of paths. If passed a single &Node;, the result
+ is the same as calling <literal>str(node)</literal> (see above).
+ The string(s) can have embedded construction variables, which are
+ expanded as usual, using the calling environment's set of
+ variables. The paths can be files or directories, and do not have
+ to exist.
+
+ </para>
+
+ <scons_example name="GetBuildPath">
+ <file name="SConstruct" printme="1">
+ env=Environment(VAR="value")
+ n=File("foo.c")
+ print env.GetBuildPath([n, "sub/dir/$VAR"])
+ </file>
+ </scons_example>
+
+ <para>
+
+ Would print the following file names:
+
+ </para>
+
+ <scons_output example="GetBuildPath" os="posix">
+ <scons_output_command>scons -Q</scons_output_command>
+ </scons_output>
+
+ <para>
+
+ There is also a function version of &GetBuildPath; which can
+ be called without an &Environment;; that uses the default SCons
+ &Environment; to do substitution on any string arguments.
+
+ </para>
+
+ </section>
+
<!--
<section>
diff --git a/doc/user/nodes.xml b/doc/user/nodes.xml
index 8192442..71ac7c1 100644
--- a/doc/user/nodes.xml
+++ b/doc/user/nodes.xml
@@ -335,6 +335,51 @@
</section>
+ <section>
+ <title>&GetBuildPath;: Getting the Path From a &Node; or String</title>
+
+ <para>
+
+ <function>env.GetBuildPath(file_or_list)</function>
+ returns the path of a &Node; or a string representing a
+ path. It can also take a list of &Node;s and/or strings, and
+ returns the list of paths. If passed a single &Node;, the result
+ is the same as calling <literal>str(node)</literal> (see above).
+ The string(s) can have embedded construction variables, which are
+ expanded as usual, using the calling environment's set of
+ variables. The paths can be files or directories, and do not have
+ to exist.
+
+ </para>
+
+ <programlisting>
+ env=Environment(VAR="value")
+ n=File("foo.c")
+ print env.GetBuildPath([n, "sub/dir/$VAR"])
+ </programlisting>
+
+ <para>
+
+ Would print the following file names:
+
+ </para>
+
+ <screen>
+ % <userinput>scons -Q</userinput>
+ ['foo.c', 'sub/dir/value']
+ scons: `.' is up to date.
+ </screen>
+
+ <para>
+
+ There is also a function version of &GetBuildPath; which can
+ be called without an &Environment;; that uses the default SCons
+ &Environment; to do substitution on any string arguments.
+
+ </para>
+
+ </section>
+
<!--
<section>
diff --git a/doc/user/parseflags.in b/doc/user/parseflags.in
index d65e5b8..2f4bea5 100644
--- a/doc/user/parseflags.in
+++ b/doc/user/parseflags.in
@@ -61,9 +61,7 @@
<file name="SConstruct" printme="1">
env = Environment()
d = env.ParseFlags("-I/opt/include -L/opt/lib -lfoo")
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -102,9 +100,7 @@
<file name="SConstruct" printme="1">
env = Environment()
d = env.ParseFlags("-whatever")
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -130,9 +126,7 @@
<file name="SConstruct" printme="1">
env = Environment()
d = env.ParseFlags(["-I/opt/include", ["-L/opt/lib", "-lfoo"]])
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -159,9 +153,7 @@
<file name="SConstruct" printme="1">
env = Environment()
d = env.ParseFlags(["!echo -I/opt/include", "!echo -L/opt/lib", "-lfoo"])
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
diff --git a/doc/user/parseflags.xml b/doc/user/parseflags.xml
index c477c98..fd15de7 100644
--- a/doc/user/parseflags.xml
+++ b/doc/user/parseflags.xml
@@ -60,9 +60,7 @@
<programlisting>
env = Environment()
d = env.ParseFlags("-I/opt/include -L/opt/lib -lfoo")
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -106,9 +104,7 @@
<programlisting>
env = Environment()
d = env.ParseFlags("-whatever")
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -132,9 +128,7 @@
<programlisting>
env = Environment()
d = env.ParseFlags(["-I/opt/include", ["-L/opt/lib", "-lfoo"]])
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
@@ -161,9 +155,7 @@
<programlisting>
env = Environment()
d = env.ParseFlags(["!echo -I/opt/include", "!echo -L/opt/lib", "-lfoo"])
- l = d.items()
- l.sort()
- for k,v in l:
+ for k,v in sorted(d.items()):
if v:
print k, v
env.MergeFlags(d)
diff --git a/doc/user/scanners.in b/doc/user/scanners.in
index 1c7ee7e..db3170a 100644
--- a/doc/user/scanners.in
+++ b/doc/user/scanners.in
@@ -329,3 +329,53 @@ over the file scanning rather than being called for each input line:
-->
</section>
+
+ <section>
+ <title>Adding a search path to a scanner: &FindPathDirs;</title>
+
+ <para>
+
+ Many scanners need to search for included files or dependencies
+ using a path variable; this is how &cv-link-CPPPATH; and
+ &cv-link-LIBPATH; work. The path to search is passed to your
+ scanner as the <literal>path</literal> argument. Path variables
+ may be lists of nodes, semicolon-separated strings, or even
+ contain SCons variables which need to be expanded. Fortunately,
+ &SCons; provides the &FindPathDirs; function which itself returns
+ a function to expand a given path (given as a SCons construction
+ variable name) to a list of paths at the time the scanner is
+ called. Deferring evaluation until that point allows, for
+ instance, the path to contain $TARGET references which differ for
+ each file scanned.
+
+ </para>
+
+ <para>
+
+ Using &FindPathDirs; is quite easy. Continuing the above example,
+ using KPATH as the construction variable with the search path
+ (analogous to &cv-link-CPPPATH;), we just modify the &Scanner;
+ constructor call to include a path keyword arg:
+
+ </para>
+
+ <scons_example name="findpathdirs">
+ <file name="SConstruct" printme="1">
+ kscan = Scanner(function = kfile_scan,
+ skeys = ['.k'],
+ path=FindPathDirs('KPATH'))
+ </file>
+ </scons_example>
+
+ <para>
+
+ FindPathDirs returns a callable object that, when called, will
+ essentially expand the elements in env['KPATH'] and tell the
+ scanner to search in those dirs. It will also properly add
+ related repository and variant dirs to the search list. As a side
+ note, the returned method stores the path in an efficient way so
+ lookups are fast even when variable substitutions may be needed.
+ This is important since many files get scanned in a typical build.
+
+ </para>
+ </section>
diff --git a/doc/user/scanners.xml b/doc/user/scanners.xml
index 7921577..2aba7d2 100644
--- a/doc/user/scanners.xml
+++ b/doc/user/scanners.xml
@@ -315,3 +315,51 @@ over the file scanning rather than being called for each input line:
-->
</section>
+
+ <section>
+ <title>Adding a search path to a scanner: &FindPathDirs;</title>
+
+ <para>
+
+ Many scanners need to search for included files or dependencies
+ using a path variable; this is how &cv-link-CPPPATH; and
+ &cv-link-LIBPATH; work. The path to search is passed to your
+ scanner as the <literal>path</literal> argument. Path variables
+ may be lists of nodes, semicolon-separated strings, or even
+ contain SCons variables which need to be expanded. Fortunately,
+ &SCons; provides the &FindPathDirs; function which itself returns
+ a function to expand a given path (given as a SCons construction
+ variable name) to a list of paths at the time the scanner is
+ called. Deferring evaluation until that point allows, for
+ instance, the path to contain $TARGET references which differ for
+ each file scanned.
+
+ </para>
+
+ <para>
+
+ Using &FindPathDirs; is quite easy. Continuing the above example,
+ using KPATH as the construction variable with the search path
+ (analogous to &cv-link-CPPPATH;), we just modify the &Scanner;
+ constructor call to include a path keyword arg:
+
+ </para>
+
+ <programlisting>
+ kscan = Scanner(function = kfile_scan,
+ skeys = ['.k'],
+ path=FindPathDirs('KPATH'))
+ </programlisting>
+
+ <para>
+
+ FindPathDirs returns a callable object that, when called, will
+ essentially expand the elements in env['KPATH'] and tell the
+ scanner to search in those dirs. It will also properly add
+ related repository and variant dirs to the search list. As a side
+ note, the returned method stores the path in an efficient way so
+ lookups are fast even when variable substitutions may be needed.
+ This is important since many files get scanned in a typical build.
+
+ </para>
+ </section>
diff --git a/doc/user/tasks.in b/doc/user/tasks.in
index fd87bd2..2945d1c 100644
--- a/doc/user/tasks.in
+++ b/doc/user/tasks.in
@@ -53,15 +53,6 @@ filename = os.path.splitext(filename)[0]+extension
import os.path
filenames = [os.path.join(prefix, x) for x in filenames]
</programlisting>
-
-<simpara>or in Python 1.5.2:</simpara>
-
-<programlisting>
-import os.path
-new_filenames = []
-for x in filenames:
- new_filenames.append(os.path.join(prefix, x))
-</programlisting>
</example>
<example>
@@ -70,14 +61,6 @@ for x in filenames:
if filename.find(old_prefix) == 0:
filename = filename.replace(old_prefix, new_prefix)
</programlisting>
-
-<simpara>or in Python 1.5.2:</simpara>
-
-<programlisting>
-import string
-if string.find(filename, old_prefix) == 0:
- filename = string.replace(filename, old_prefix, new_prefix)
-</programlisting>
</example>
<example>
@@ -87,16 +70,6 @@ of extensions</title>
import os.path
filenames = [x for x in filenames if os.path.splitext(x)[1] in extensions]
</programlisting>
-
-<simpara>or in Python 1.5.2:</simpara>
-
-<programlisting>
-import os.path
-new_filenames = []
-for x in filenames:
- if os.path.splitext(x)[1] in extensions:
- new_filenames.append(x)
-</programlisting>
</example>
<example>
diff --git a/doc/user/tasks.xml b/doc/user/tasks.xml
index fd87bd2..2945d1c 100644
--- a/doc/user/tasks.xml
+++ b/doc/user/tasks.xml
@@ -53,15 +53,6 @@ filename = os.path.splitext(filename)[0]+extension
import os.path
filenames = [os.path.join(prefix, x) for x in filenames]
</programlisting>
-
-<simpara>or in Python 1.5.2:</simpara>
-
-<programlisting>
-import os.path
-new_filenames = []
-for x in filenames:
- new_filenames.append(os.path.join(prefix, x))
-</programlisting>
</example>
<example>
@@ -70,14 +61,6 @@ for x in filenames:
if filename.find(old_prefix) == 0:
filename = filename.replace(old_prefix, new_prefix)
</programlisting>
-
-<simpara>or in Python 1.5.2:</simpara>
-
-<programlisting>
-import string
-if string.find(filename, old_prefix) == 0:
- filename = string.replace(filename, old_prefix, new_prefix)
-</programlisting>
</example>
<example>
@@ -87,16 +70,6 @@ of extensions</title>
import os.path
filenames = [x for x in filenames if os.path.splitext(x)[1] in extensions]
</programlisting>
-
-<simpara>or in Python 1.5.2:</simpara>
-
-<programlisting>
-import os.path
-new_filenames = []
-for x in filenames:
- if os.path.splitext(x)[1] in extensions:
- new_filenames.append(x)
-</programlisting>
</example>
<example>
diff --git a/doc/user/troubleshoot.xml b/doc/user/troubleshoot.xml
index 428aa69..468af92 100644
--- a/doc/user/troubleshoot.xml
+++ b/doc/user/troubleshoot.xml
@@ -284,11 +284,11 @@
'.spp',
'.SPP'],
'DSUFFIXES': ['.d'],
- 'Dir': &lt;SCons.Defaults.Variable_Method_Caller instance at 0x700000&gt;,
- 'Dirs': &lt;SCons.Defaults.Variable_Method_Caller instance at 0x700000&gt;,
- 'ENV': {'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'},
+ 'Dir': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
+ 'Dirs': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
+ 'ENV': { 'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'},
'ESCAPE': &lt;function escape at 0x700000&gt;,
- 'File': &lt;SCons.Defaults.Variable_Method_Caller instance at 0x700000&gt;,
+ 'File': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
'HOST_ARCH': None,
'HOST_OS': None,
'IDLSUFFIXES': ['.idl', '.IDL'],
@@ -304,7 +304,7 @@
'PROGPREFIX': '',
'PROGSUFFIX': '',
'PSPAWN': &lt;function piped_env_spawn at 0x700000&gt;,
- 'RDirs': &lt;SCons.Defaults.Variable_Method_Caller instance at 0x700000&gt;,
+ 'RDirs': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
'SCANNERS': [],
'SHELL': 'sh',
'SHLIBPREFIX': '$LIBPREFIX',
@@ -314,7 +314,7 @@
'SPAWN': &lt;function spawnvpe_spawn at 0x700000&gt;,
'TARGET_ARCH': None,
'TARGET_OS': None,
- 'TEMPFILE': &lt;class SCons.Platform.TempFileMunge at 0x700000&gt;,
+ 'TEMPFILE': &lt;class 'SCons.Platform.TempFileMunge'&gt;,
'TEMPFILEPREFIX': '@',
'TOOLS': ['install', 'install'],
'_CPPDEFFLAGS': '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, __env__)}',
@@ -341,9 +341,9 @@
<screen>
C:\><userinput>scons</userinput>
scons: Reading SConscript files ...
- { 'BUILDERS': {'_InternalInstall': &lt;function InstallBuilderWrapper at 0x700000&gt;, 'Object': &lt;SCons.Builder.CompositeBuilder instance at 0x700000&gt;, 'PCH': &lt;SCons.Builder.BuilderBase instance at 0x700000&gt;, 'RES': &lt;SCons.Builder.BuilderBase instance at 0x700000&gt;, 'SharedObject': &lt;SCons.Builder.CompositeBuilder instance at 0x700000&gt;, 'StaticObject': &lt;SCons.Builder.CompositeBuilder instance at 0x700000&gt;, '_InternalInstallAs': &lt;function InstallAsBuilderWrapper at 0x700000&gt;},
+ { 'BUILDERS': {'_InternalInstall': &lt;function InstallBuilderWrapper at 0x700000&gt;, 'Object': &lt;SCons.Builder.CompositeBuilder object at 0x700000&gt;, 'PCH': &lt;SCons.Builder.BuilderBase object at 0x700000&gt;, 'RES': &lt;SCons.Builder.BuilderBase object at 0x700000&gt;, 'SharedObject': &lt;SCons.Builder.CompositeBuilder object at 0x700000&gt;, 'StaticObject': &lt;SCons.Builder.CompositeBuilder object at 0x700000&gt;, '_InternalInstallAs': &lt;function InstallAsBuilderWrapper at 0x700000&gt;},
'CC': 'cl',
- 'CCCOM': &lt;SCons.Action.FunctionAction instance at 0x700000&gt;,
+ 'CCCOM': &lt;SCons.Action.FunctionAction object at 0x700000&gt;,
'CCFLAGS': ['/nologo'],
'CCPCHFLAGS': ['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'],
'CCPDBFLAGS': ['${(PDB and "/Z7") or ""}'],
@@ -377,13 +377,13 @@
'CXXFILESUFFIX': '.cc',
'CXXFLAGS': ['$(', '/TP', '$)'],
'DSUFFIXES': ['.d'],
- 'Dir': &lt;SCons.Defaults.Variable_Method_Caller instance at 0x700000&gt;,
- 'Dirs': &lt;SCons.Defaults.Variable_Method_Caller instance at 0x700000&gt;,
+ 'Dir': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
+ 'Dirs': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
'ENV': { 'PATH': 'C:\\WINDOWS\\System32',
'PATHEXT': '.COM;.EXE;.BAT;.CMD',
'SystemRoot': 'C:\\WINDOWS'},
'ESCAPE': &lt;function escape at 0x700000&gt;,
- 'File': &lt;SCons.Defaults.Variable_Method_Caller instance at 0x700000&gt;,
+ 'File': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
'HOST_ARCH': '',
'HOST_OS': 'win32',
'IDLSUFFIXES': ['.idl', '.IDL'],
@@ -405,13 +405,13 @@
'PROGSUFFIX': '.exe',
'PSPAWN': &lt;function piped_spawn at 0x700000&gt;,
'RC': 'rc',
- 'RCCOM': &lt;SCons.Action.FunctionAction instance at 0x700000&gt;,
+ 'RCCOM': &lt;SCons.Action.FunctionAction object at 0x700000&gt;,
'RCFLAGS': [],
'RCSUFFIXES': ['.rc', '.rc2'],
- 'RDirs': &lt;SCons.Defaults.Variable_Method_Caller instance at 0x700000&gt;,
+ 'RDirs': &lt;SCons.Defaults.Variable_Method_Caller object at 0x700000&gt;,
'SCANNERS': [],
'SHCC': '$CC',
- 'SHCCCOM': &lt;SCons.Action.FunctionAction instance at 0x700000&gt;,
+ 'SHCCCOM': &lt;SCons.Action.FunctionAction object at 0x700000&gt;,
'SHCCFLAGS': ['$CCFLAGS'],
'SHCFLAGS': ['$CFLAGS'],
'SHCXX': '$CXX',
@@ -426,7 +426,7 @@
'STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME': 1,
'TARGET_ARCH': '',
'TARGET_OS': 'win32',
- 'TEMPFILE': &lt;class SCons.Platform.TempFileMunge at 0x700000&gt;,
+ 'TEMPFILE': &lt;class 'SCons.Platform.TempFileMunge'&gt;,
'TEMPFILEPREFIX': '@',
'TOOLS': ['msvc', 'install', 'install'],
'_CCCOMCOM': '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS',
@@ -489,7 +489,7 @@
<screen>
% <userinput>scons</userinput>
scons: Reading SConscript files ...
- {'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'}
+ { 'PATH': '/usr/local/bin:/opt/bin:/bin:/usr/bin'}
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
@@ -1118,14 +1118,14 @@
% <userinput>scons -Q --debug=stacktrace</userinput>
scons: *** [prog.o] Source `prog.c' not found, needed by target `prog.o'.
scons: internal stack trace:
- File "bootstrap/src/engine/SCons/Job.py", line 197, in start
+ File "bootstrap/src/engine/SCons/Job.py", line 199, in start
task.prepare()
File "bootstrap/src/engine/SCons/Script/Main.py", line 167, in prepare
return SCons.Taskmaster.OutOfDateTask.prepare(self)
- File "bootstrap/src/engine/SCons/Taskmaster.py", line 190, in prepare
+ File "bootstrap/src/engine/SCons/Taskmaster.py", line 187, in prepare
executor.prepare()
- File "bootstrap/src/engine/SCons/Executor.py", line 397, in prepare
- raise SCons.Errors.StopError, msg % (s, self.batches[0].targets[0])
+ File "bootstrap/src/engine/SCons/Executor.py", line 392, in prepare
+ raise SCons.Errors.StopError(msg % (s, self.batches[0].targets[0]))
</screen>
<para>