Skip to content

Commit 3494131

Browse files
committed
Commit the files changed for Sphinx docbuild [ci skip]
Signed-off-by: Mats Wichmann <[email protected]>
1 parent 71ea183 commit 3494131

File tree

10 files changed

+76
-57
lines changed

10 files changed

+76
-57
lines changed

SCons/Environment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,11 +1502,11 @@ def Detect(self, progs):
15021502
def Dictionary(self, *args):
15031503
"""Return construction variables from an environment.
15041504
1505-
:param *args: (optional) variable names to look up
1505+
:param args: (optional) variable names to look up
15061506
:returns: if args omitted, the dictionary of all constr. vars.
15071507
If one arg, the corresponding value is returned.
15081508
If more than one arg, a list of values is returned.
1509-
:raises KeyError: if any of *args is not in the construction env.
1509+
:raises KeyError: if any of args is not in the construction env.
15101510
15111511
"""
15121512
if not args:
@@ -2017,7 +2017,7 @@ def Command(self, target, source, action, **kw):
20172017
pass
20182018
else:
20192019
del kw['target_factory']
2020-
2020+
20212021
bld = SCons.Builder.Builder(**bkw)
20222022
return bld(self, target, source, **kw)
20232023

SCons/Errors.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@
3535

3636

3737
class BuildError(Exception):
38-
""" Errors occurring while building.
38+
"""SCons Errors that can occur while building.
3939
40-
BuildError have the following attributes:
41-
=========================================
40+
BuildError has the following attributes:
4241
4342
Information about the cause of the build error:
44-
-----------------------------------------------
4543
4644
errstr : a description of the error message
4745
@@ -71,7 +69,6 @@ class BuildError(Exception):
7169
7270
7371
Information about the cause of the location of the error:
74-
---------------------------------------------------------
7572
7673
node : the error occured while building this target node(s)
7774

SCons/Platform/__init__.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@
5858
def platform_default():
5959
"""Return the platform string for our execution environment.
6060
61-
The returned value should map to one of the SCons/Platform/*.py
62-
files. Since we're architecture independent, though, we don't
61+
The returned value should map to one of the SCons/Platform/\*.py
62+
files. Since scons is architecture independent, though, we don't
6363
care about the machine architecture.
6464
"""
6565
osname = os.name
@@ -136,20 +136,23 @@ class TempFileMunge:
136136
file substitution on it. This is used to circumvent the long command
137137
line limitation.
138138
139-
Example usage:
139+
Example:
140+
140141
env["TEMPFILE"] = TempFileMunge
141142
env["LINKCOM"] = "${TEMPFILE('$LINK $TARGET $SOURCES','$LINKCOMSTR')}"
142143
143144
By default, the name of the temporary file used begins with a
144145
prefix of '@'. This may be configured for other tool chains by
145-
setting '$TEMPFILEPREFIX':
146+
setting '$TEMPFILEPREFIX'. Example:
147+
146148
env["TEMPFILEPREFIX"] = '-@' # diab compiler
147149
env["TEMPFILEPREFIX"] = '-via' # arm tool chain
148150
env["TEMPFILEPREFIX"] = '' # (the empty string) PC Lint
149151
150152
You can configure the extension of the temporary file through the
151153
TEMPFILESUFFIX variable, which defaults to '.lnk' (see comments
152-
in the code below):
154+
in the code below). Example:
155+
153156
env["TEMPFILESUFFIX"] = '.lnt' # PC Lint
154157
"""
155158
def __init__(self, cmd, cmdstr = None):

SCons/Script/SConsOptions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,8 @@ def reparse_local_options(self):
345345
346346
Else, this would lead to problems in add_local_option()
347347
below. When called from there, we try to reparse the
348-
command-line arguments that
348+
command-line arguments that:
349+
349350
1. haven't been processed so far (self.largs), but
350351
2. are possibly not added to the list of options yet.
351352
@@ -355,6 +356,7 @@ def reparse_local_options(self):
355356
_match_long_opt(), which allows for partial matches of
356357
the option name, as long as the common prefix appears to
357358
be unique.
359+
358360
This would lead to further confusion, because we might want
359361
to add another option "--myarg" later on (see issue #2929).
360362

SCons/Tool/dmd.py

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,33 @@
1010
2010-02-07 onwards
1111
1212
Compiler variables:
13-
DC - The name of the D compiler to use. Defaults to dmd or gdmd,
14-
whichever is found.
15-
DPATH - List of paths to search for import modules.
16-
DVERSIONS - List of version tags to enable when compiling.
17-
DDEBUG - List of debug tags to enable when compiling.
13+
14+
DC
15+
The name of the D compiler to use. Defaults to dmd or gdmd, whichever is found.
16+
DPATH
17+
List of paths to search for import modules.
18+
DVERSIONS
19+
List of version tags to enable when compiling.
20+
DDEBUG
21+
List of debug tags to enable when compiling.
1822
1923
Linker related variables:
20-
LIBS - List of library files to link in.
21-
DLINK - Name of the linker to use. Defaults to dmd or gdmd,
22-
whichever is found.
23-
DLINKFLAGS - List of linker flags.
24+
25+
LIBS
26+
List of library files to link in.
27+
DLINK
28+
Name of the linker to use. Defaults to dmd or gdmd, whichever is found.
29+
DLINKFLAGS
30+
List of linker flags.
2431
2532
Lib tool variables:
26-
DLIB - Name of the lib tool to use. Defaults to lib.
27-
DLIBFLAGS - List of flags to pass to the lib tool.
28-
LIBS - Same as for the linker. (libraries to pull into the .lib)
33+
34+
DLIB
35+
Name of the lib tool to use. Defaults to lib.
36+
DLIBFLAGS
37+
List of flags to pass to the lib tool.
38+
LIBS
39+
Same as for the linker. (libraries to pull into the .lib)
2940
"""
3041

3142
#

SCons/Tool/intelc.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,13 @@ def find_in_2016style_dir(version):
387387
def generate(env, version=None, abi=None, topdir=None, verbose=0):
388388
r"""Add Builders and construction variables for Intel C/C++ compiler
389389
to an Environment.
390-
args:
391-
version: (string) compiler version to use, like "80"
392-
abi: (string) 'win32' or whatever Itanium version wants
393-
topdir: (string) compiler top dir, like
394-
"c:\Program Files\Intel\Compiler70"
395-
If topdir is used, version and abi are ignored.
396-
verbose: (int) if >0, prints compiler version used.
390+
391+
:param string version: compiler version to use, like "80"
392+
:param string abi: 'win32' or whatever Itanium version wants
393+
:param string topdir: directory containing compiler tree, e.g.
394+
"c:\\Program Files\\Intel\\Compiler70".
395+
If `topdir` is used, `version` and `abi` are ignored.
396+
:param int verbose: if >0, prints compiler version used.
397397
"""
398398
if not (is_mac or is_linux or is_windows):
399399
# can't handle this platform

SCons/Tool/packaging/rpm.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -302,21 +302,23 @@ def build_specfile_filesection(spec, files):
302302
return str
303303

304304
class SimpleTagCompiler:
305-
""" This class is a simple string substition utility:
306-
the replacement specfication is stored in the tagset dictionary, something
307-
like:
308-
{ "abc" : "cdef %s ",
309-
"abc_" : "cdef %s %s" }
305+
""" Compile RPM tags by doing simple string substitution.
310306
311-
the compile function gets a value dictionary, which may look like:
312-
{ "abc" : "ghij",
313-
"abc_gh" : "ij" }
307+
The replacement specfication is stored in the *tagset* dictionary,
308+
something like:
309+
310+
{"abc" : "cdef %s ", "abc_": "cdef %s %s"}
311+
312+
The :func:`compile` function gets a value dictionary, which may look like:
313+
314+
{"abc": "ghij", "abc_gh": "ij"}
314315
315316
The resulting string will be:
316-
"cdef ghij cdef gh ij"
317+
318+
"cdef ghij cdef gh ij"
317319
"""
318320
def __init__(self, tagset, mandatory=1):
319-
self.tagset = tagset
321+
self.tagset = tagset
320322
self.mandatory = mandatory
321323

322324
def compile(self, values):

SCons/Util.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,16 +1611,18 @@ def cmp(a, b):
16111611

16121612

16131613
def get_env_bool(env, name, default=False):
1614-
"""Get a value of env[name] converted to boolean. The value of env[name] is
1615-
interpreted as follows: 'true', 'yes', 'y', 'on' (case insensitive) and
1616-
anything convertible to int that yields non-zero integer are True values;
1617-
'0', 'false', 'no', 'n' and 'off' (case insensitive) are False values. For
1618-
all other cases, default value is returned.
1619-
1620-
:Parameters:
1621-
- `env` - dict or dict-like object, a convainer with variables
1622-
- `name` - name of the variable in env to be returned
1623-
- `default` - returned when env[name] does not exist or can't be converted to bool
1614+
"""Convert a construction variable to bool.
1615+
1616+
If the value of *name* in *env* is 'true', 'yes', 'y', 'on' (case
1617+
insensitive) or anything convertible to int that yields non-zero then
1618+
return True; if 'false', 'no', 'n', 'off' (case insensitive)
1619+
or a number that converts to integer zero return False.
1620+
Otherwise, return *default*.
1621+
1622+
:param env: construction environment, or any dict-like object
1623+
:param name: name of the variable
1624+
:param default: value to return if name not in env or cannot be converted (default: False)
1625+
:rtype: bool
16241626
"""
16251627
try:
16261628
var = env[name]
@@ -1638,7 +1640,10 @@ def get_env_bool(env, name, default=False):
16381640

16391641

16401642
def get_os_env_bool(name, default=False):
1641-
"""Same as get_env_bool(os.environ, name, default)."""
1643+
"""Convert an environment variable to bool.
1644+
1645+
Conversion is the same as for :func:`get_env_bool`.
1646+
"""
16421647
return get_env_bool(os.environ, name, default)
16431648

16441649
# Local Variables:

SCons/cpp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,8 +603,7 @@ def resolve_include(self, t):
603603
604604
This handles recursive expansion of values without "" or <>
605605
surrounding the name until an initial " or < is found, to handle
606-
#include FILE
607-
where FILE is a #define somewhere else.
606+
#include FILE where FILE is a #define somewhere else.
608607
"""
609608
s = t[1].strip()
610609
while not s[0] in '<"':

doc/sphinx/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ SCons Project API Documentation
2020
SCons.Tool.clangCommon
2121
SCons.Tool.docbook
2222
SCons.Tool.MSCommon
23-
SCons.Tool.packaging.
23+
SCons.Tool.packaging
2424
SCons.Variables
2525

2626

0 commit comments

Comments
 (0)