summaryrefslogtreecommitdiffstats
path: root/doc/man
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2021-11-26 17:25:50 (GMT)
committerMats Wichmann <mats@linux.com>2021-11-26 18:16:59 (GMT)
commit9649d0fd2326d607ee545625cea45cf72aab87a6 (patch)
treef1dfbf812ca0624b9836a583d7da6c14af14d450 /doc/man
parentc335e187fb9b2c79fe03489c13cb7859969ed25c (diff)
downloadSCons-9649d0fd2326d607ee545625cea45cf72aab87a6.zip
SCons-9649d0fd2326d607ee545625cea45cf72aab87a6.tar.gz
SCons-9649d0fd2326d607ee545625cea45cf72aab87a6.tar.bz2
Fix tests to not hang on Windows with bad .py assoc
For systems where the association for .py files is not to an actual Python interpreter, those few cases where we need to run a Python script directly as a program don't work. This could be because the association was never set up, or because some other program (e.g. Visual Studio Code) has taken it over. In some cases may appear to "hang" because the alternate program is waiting for user interaction runtest.py now has a mechanism to check (thanks to Brett Cannon for providing this incantation). It isn't super precise (looks for the substring "py" in the queried association), but should work out. It sets an environment variable which the test framework can read and as a result set a flag which individual tests can read. Two tests in scons-time which had previously been set to skip-if-win32 now look at this flag instead. Three tests in sconsign now also look at this flag. This allows a clean run on my dev box with VS Code having taken over the .py association. Various things can break if the environment used to fire off Windows processes doesn't contain %UserProfile%. Added this to the short list of passthrough env vars. Apparently an environment without this value is now considered invalid (it blew up the erroneously launched VS Code, but we've apparently been lucky it hasn't blown up more things - believe there was also a report of a problem with the Visual Studio setup scripts). A little extra cleanup: - a couple of Py2-isms were cleaned out (Script/Main.py and in the test framework) - The paths to look for site-scons were rewritten (part of this was another Py2-ism), and the system path changed a bit - the old path is still checked, and the manpage updated to reflect this. - runtest.py dropped the unused whereis functions. - the three sconsign tests now use f-string formatting, mostly as an experiment to see how easy it is to convert. Fixes #4053 Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'doc/man')
-rw-r--r--doc/man/scons.xml39
1 files changed, 24 insertions, 15 deletions
diff --git a/doc/man/scons.xml b/doc/man/scons.xml
index c96d142..130e1a9 100644
--- a/doc/man/scons.xml
+++ b/doc/man/scons.xml
@@ -1729,27 +1729,28 @@ Also suppresses SCons status messages.</para>
</varlistentry>
<varlistentry id="opt-site-dir">
- <term><option>--site-dir=<replaceable>dir</replaceable></option></term>
+ <term><option>--site-dir=<replaceable>path</replaceable></option></term>
<listitem>
-<para>Uses the named <replaceable>dir</replaceable> as the site directory
-rather than the default
-<filename>site_scons</filename>
-directories. This directory will be prepended to
+<para>Use a specific <replaceable>path</replaceable> as the site directory
+rather than searching the list of default site directories.
+This directory will be prepended to
<varname>sys.path</varname>,
the module
-<filename><replaceable>dir</replaceable>/site_init.py</filename>
+<filename><replaceable>path</replaceable>/site_init.py</filename>
will be loaded if it exists, and
-<filename><replaceable>dir</replaceable>/site_tools</filename>
+<filename><replaceable>path</replaceable>/site_tools</filename>
will be added to the default toolpath.</para>
-<para>The default set of
-<filename>site_scons</filename>
-directories used when
+<para>The default set of site directories searched when
<option>--site-dir</option>
is not specified depends on the system platform, as follows.
+Users or system administrators can tune site-specific or
+project-specific &SCons; behavior by setting up a
+site directory in one or more of these locations.
Directories are examined in the order given, from most
-generic to most specific, so the last-executed <filename>site_init.py</filename> file is
-the most specific one (which gives it the chance to override
+generic ("system" directories) to most specific (in the current project),
+so the last-executed <filename>site_init.py</filename> file is
+the most specific one, giving it the chance to override
everything else), and the directories are prepended to the paths, again so
the last directory examined comes first in the resulting path.</para>
@@ -1758,12 +1759,20 @@ the last directory examined comes first in the resulting path.</para>
<term>Windows:</term>
<listitem>
<literallayout class="monospaced">
-%ALLUSERSPROFILE/Application Data/scons/site_scons
-%USERPROFILE%/Local Settings/Application Data/scons/site_scons
+%ALLUSERSPROFILE%/scons/site_scons
+%LOCALAPPDATA%/scons/site_scons
%APPDATA%/scons/site_scons
-%HOME%/.scons/site_scons
+%USERPROFILE%/.scons/site_scons
./site_scons
</literallayout>
+<para>
+Note earlier versions of the documentation listed a different
+path for the "system" site directory, this path is still checked
+but its use is discouraged:
+</para>
+<literallayout class="monospaced">
+%ALLUSERSPROFILE%/Application Data/scons/site_scons
+</literallayout>
</listitem>
</varlistentry>