summaryrefslogtreecommitdiff
path: root/doc/user/builders-writing.xml
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2017-08-05 08:11:25 +0100
committerRussel Winder <russel@winder.org.uk>2017-08-05 08:11:25 +0100
commit957f2678b2b3a4e516f18f091f752319332bef25 (patch)
treed557e8efa99b0e39421a904d4268336d7fde9335 /doc/user/builders-writing.xml
parente71ea1913673759e7b01a2c0d4516912c26fd3bc (diff)
parent339dbb02d87eeb756467a66d9016a95582faaeee (diff)
downloadscons-957f2678b2b3a4e516f18f091f752319332bef25.tar.gz
Merge mainline.
Diffstat (limited to 'doc/user/builders-writing.xml')
-rw-r--r--doc/user/builders-writing.xml47
1 files changed, 0 insertions, 47 deletions
diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml
index 35dd989d..07f2dec6 100644
--- a/doc/user/builders-writing.xml
+++ b/doc/user/builders-writing.xml
@@ -880,53 +880,6 @@ env2.Foo('file2')
</section>
- <section>
- <title>Nested and namespace builders;</title>
-
- <para>
- &SCons; now supports the ability for a Builder to be located within a sub-directory of the toolpath.
- This is similar to namespacing within python.
-
- Normally when loading a tool into the environment, scons will search for the tool within two locations
- </para>
-
- <sconstruct>
-# Regular non namespace target
-env = Environment(ENV = os.environ, tools = ['SomeTool'])
-env.SomeTool(targets, sources)
- </sconstruct>
-
- <para>
- The locations would include
- <filename>SCons\Tool\SomeTool.py</filename>
- <filename>SCons\Tool\SomeTool\__init__.py</filename>
- <filename>.\site_scons\site_tools\SomeTool.py</filename>
- <filename>.\site_scons\site_tools\SomeTool\__init__.py</filename>
-
- If a toolpath is specified this is also searched as well.
- With nested or namespaced tools we can use the dot notation to specify a sub-directoty that the tool is located under
- </para>
-
- <sconstruct>
-# namespaced target
-env = Environment(ENV = os.environ, tools = ['SubDir1.SubDir2.SomeTool'])
-env.SomeTool(targets, sources)
- </sconstruct>
-
- <para>
- With this example the search locations would include
- <filename>SCons\Tool\SubDir1\SubDir2\SomeTool.py</filename>
- <filename>SCons\Tool\SubDir1\SubDir2\SomeTool\__init__.py</filename>
- <filename>.\site_scons\site_tools\SubDir1\SubDir2\SomeTool.py</filename>
- <filename>.\site_scons\site_tools\SubDir1\SubDir2\SomeTool\__init__.py</filename>
-
- It's important to note when creating tools within sub-directories, there needs to be a __init__.py file within each directory.
- This file can just be empty however.
- This is the same constraint used by python when loading modules from within sub-directories (packages).
-
- </para>
- </section>
-
<!--
<section>