diff options
author | Richard W <garlicbready@googlemail.com> | 2017-08-02 14:04:08 +0100 |
---|---|---|
committer | Richard W <garlicbready@googlemail.com> | 2017-08-02 14:04:08 +0100 |
commit | 91fdd0bf5a7a4337d6a0caa52a561db93b823ac8 (patch) | |
tree | fe3306419eff308b602775b880ca258f60484950 | |
parent | 66d738e78a75aa8657402804b79c4881fd9dce30 (diff) | |
parent | 79004a7e388e5567956272f1d62a133db2e487a1 (diff) | |
download | scons-91fdd0bf5a7a4337d6a0caa52a561db93b823ac8.tar.gz |
Merged scons/scons into default
31 files changed, 231 insertions, 68 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> diff --git a/doc/user/environments.xml b/doc/user/environments.xml index d1da3f9c..c99a71f9 100644 --- a/doc/user/environments.xml +++ b/doc/user/environments.xml @@ -1765,4 +1765,128 @@ env.AppendENVPath('LIB', '/usr/local/lib') </section> + + <section id="sect-environment-toolpath"> + <title>Using the toolpath for external Tools</title> + + <section> + <title>The default tool search path</title> + + <para> + Normally when using a tool from the construction environment, + several different search locations are checked by default. + This includes the <literal>Scons/Tools/</literal> directory + inbuilt to scons and the directory <literal>site_scons/site_tools</literal> + relative to the root SConstruct file. + </para> + + <sconstruct> +# Inbuilt tool or tool located within site_tools +env = Environment(ENV = os.environ, tools = ['SomeTool']) +env.SomeTool(targets, sources) + +# The search locations would include by default +SCons/Tool/SomeTool.py +SCons/Tool/SomeTool/__init__.py +./site_scons/site_tools/SomeTool.py +./site_scons/site_tools/SomeTool/__init__.py + </sconstruct> + + </section> + + <section> + <title>Providing an external directory to toolpath</title> + + <para> + In some cases you may want to specify a different location to search for tools. + The Environment constructor contains an option for this called toolpath + This can be used to add additional search directories. + </para> + + <sconstruct> +# Tool located within the toolpath directory option +env = Environment(ENV = os.environ, tools = ['SomeTool'], toolpath = ['/opt/SomeToolPath', '/opt/SomeToolPath2']) +env.SomeTool(targets, sources) + +# The search locations in this example would include: +/opt/SomeToolPath/SomeTool.py +/opt/SomeToolPath/SomeTool/__init__.py +/opt/SomeToolPath2/SomeTool.py +/opt/SomeToolPath2/SomeTool/__init__.py +SCons/Tool/SomeTool.py +SCons/Tool/SomeTool/__init__.py +./site_scons/site_tools/SomeTool.py +./site_scons/site_tools/SomeTool/__init__.py + </sconstruct> + + </section> + + <section> + <title>Nested Tools within a toolpath</title> + + <para> + &SCons; 3.0 now supports the ability for a Builder to be located + within a sub-directory / sub-package of the toolpath. + This is similar to namespacing within python. + With nested or namespaced tools we can use the dot notation + to specify a sub-directory that the tool is located under. + </para> + + <sconstruct> +# namespaced target +env = Environment(ENV = os.environ, tools = ['SubDir1.SubDir2.SomeTool'], toolpath = ['/opt/SomeToolPath']) +env.SomeTool(targets, sources) + +# With this example the search locations would include +/opt/SomeToolPath/SubDir1/SubDir2/SomeTool.py +/opt/SomeToolPath/SubDir1/SubDir2/SomeTool/__init__.py +SCons/Tool/SubDir1/SubDir2/SomeTool.py +SCons/Tool/SubDir1/SubDir2/SomeTool/__init__.py +./site_scons/site_tools/SubDir1/SubDir2/SomeTool.py +./site_scons/site_tools/SubDir1/SubDir2/SomeTool/__init__.py + </sconstruct> + + <para> + 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. + This is the same constraint used by python when loading modules + from within sub-directories (packages). + </para> + </section> + + <section> + <title>Using sys.path within the toolpath</title> + + <para> + Using the toolpath option with sys.path + we can also include tools installed via the pip package manager. + </para> + + <sconstruct> +# namespaced target using sys.path within toolpath +env = Environment(ENV = os.environ, tools = ['someinstalledpackage.SomeTool'], toolpath = sys.path) +env.SomeTool(targets, sources) + </sconstruct> + + <para> + By supplying sys.path to the toolpath argument + and by using the nested syntax we can have scons search + the sys.path (which will include packages installed via pip). + </para> + +<sconstruct> +# For Windows based on the python version and install directory, this may be something like +C:\Python35\Lib\site-packages\someinstalledpackage\SomeTool.py +C:\Python35\Lib\site-packages\someinstalledpackage\SomeTool\__init__.py + +# For Linux this could be something like: +/usr/lib/python3/dist-packages/someinstalledpackage/SomeTool.py +/usr/lib/python3/dist-packages/someinstalledpackage/SomeTool/__init__.py +</sconstruct> + + </section> + + </section> + </chapter> diff --git a/src/CHANGES.txt b/src/CHANGES.txt index c3cafca7..d0329495 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -18,6 +18,8 @@ may cause rebuilds. In no case should rebuilds not happen. From Richard West: - Added nested / namespace tool support - Added a small fix to the python3 tool loader when loading a tool as a package + - Added additional documentation to the user manual on using toolpaths with the environment + This includes the use of sys.path to search for tools installed via pip or package managers From William Blevins: - Updated D language scanner support to latest: 2.071.1. (PR #1924) diff --git a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py index 072daf0f..072daf0f 100644 --- a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool1.py +++ b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool1.py diff --git a/test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py index f4ccefee..f4ccefee 100644 --- a/test/toolpath/nested/image/tools/subdir1/subdir2/Toolpath_TestTool2.py +++ b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/__init__.py diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/sconstest.skip index e69de29b..e69de29b 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/sconstest.skip +++ b/test/toolpath/nested/image/Libs/tools_example/Toolpath_TestTool2/sconstest.skip diff --git a/test/toolpath/nested/image/tools/subdir1/__init__.py b/test/toolpath/nested/image/Libs/tools_example/__init__.py index e69de29b..e69de29b 100644 --- a/test/toolpath/nested/image/tools/subdir1/__init__.py +++ b/test/toolpath/nested/image/Libs/tools_example/__init__.py diff --git a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/sconstest.skip index e69de29b..e69de29b 100644 --- a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/sconstest.skip +++ b/test/toolpath/nested/image/Libs/tools_example/sconstest.skip diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Site_TestTool2.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py index adae55bb..2a70e678 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Site_TestTool2.py +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_1.py @@ -1,4 +1,4 @@ def generate(env):
- env['Site_TestTool2'] = 1
+ env['Toolpath_TestTool1_1'] = 1
def exists(env):
return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py index 60bbd02f..424991f1 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool3/__init__.py +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/__init__.py @@ -1,4 +1,4 @@ def generate(env):
- env['Site_TestTool3'] = 1
+ env['Toolpath_TestTool1_2'] = 1
def exists(env):
return 1
diff --git a/test/toolpath/nested/image/tools/subdir1/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/sconstest.skip index e69de29b..e69de29b 100644 --- a/test/toolpath/nested/image/tools/subdir1/sconstest.skip +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/Toolpath_TestTool1_2/sconstest.skip diff --git a/test/toolpath/nested/image/tools/subdir1/subdir2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/__init__.py index e69de29b..e69de29b 100644 --- a/test/toolpath/nested/image/tools/subdir1/subdir2/__init__.py +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/__init__.py diff --git a/test/toolpath/nested/image/tools/subdir1/subdir2/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/subdir1/sconstest.skip index e69de29b..e69de29b 100644 --- a/test/toolpath/nested/image/tools/subdir1/subdir2/sconstest.skip +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/sconstest.skip diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py new file mode 100644 index 00000000..13d04963 --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_1.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool2_1'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py new file mode 100644 index 00000000..3f8fd5e2 --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool2_2'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/__init__.py b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/__init__.py diff --git a/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/sconstest.skip b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/sconstest.skip new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/toolpath/nested/image/Libs/tools_example/subdir1/subdir2/sconstest.skip diff --git a/test/toolpath/nested/image/SConstruct b/test/toolpath/nested/image/SConstruct index 284f21c5..211a0d73 100644 --- a/test/toolpath/nested/image/SConstruct +++ b/test/toolpath/nested/image/SConstruct @@ -1,15 +1,58 @@ -# Test where tools are located under site_scons/site_tools
-env1 = Environment(tools=['subdir1.Site_TestTool1', 'subdir1.subdir2.Site_TestTool2', 'subdir1.Site_TestTool3'])
-print("env1['Site_TestTool1'] =", env1.get('Site_TestTool1'))
-print("env1['Site_TestTool2'] =", env1.get('Site_TestTool2'))
-print("env1['Site_TestTool3'] =", env1.get('Site_TestTool3'))
-
-# Test where toolpath is set in the env constructor
-env2 = Environment(tools=['subdir1.Toolpath_TestTool1', 'subdir1.subdir2.Toolpath_TestTool2', 'subdir1.Toolpath_TestTool3'], toolpath=['tools'])
+import sys, os
+
+toollist = ['Toolpath_TestTool1',
+ 'Toolpath_TestTool2',
+ 'subdir1.Toolpath_TestTool1_1',
+ 'subdir1.Toolpath_TestTool1_2',
+ 'subdir1.subdir2.Toolpath_TestTool2_1',
+ 'subdir1.subdir2.Toolpath_TestTool2_2',
+ ]
+
+print('Test where tools are located under site_scons/site_tools')
+env1 = Environment(tools=toollist)
+print("env1['Toolpath_TestTool1'] =", env1.get('Toolpath_TestTool1'))
+print("env1['Toolpath_TestTool2'] =", env1.get('Toolpath_TestTool2'))
+print("env1['Toolpath_TestTool1_1'] =", env1.get('Toolpath_TestTool1_1'))
+print("env1['Toolpath_TestTool1_2'] =", env1.get('Toolpath_TestTool1_2'))
+print("env1['Toolpath_TestTool2_1'] =", env1.get('Toolpath_TestTool2_1'))
+print("env1['Toolpath_TestTool2_2'] =", env1.get('Toolpath_TestTool2_2'))
+
+print('Test where toolpath is set in the env constructor')
+env2 = Environment(tools=toollist, toolpath=['Libs/tools_example'])
print("env2['Toolpath_TestTool1'] =", env2.get('Toolpath_TestTool1'))
print("env2['Toolpath_TestTool2'] =", env2.get('Toolpath_TestTool2'))
-print("env2['Toolpath_TestTool3'] =", env2.get('Toolpath_TestTool3'))
+print("env2['Toolpath_TestTool1_1'] =", env2.get('Toolpath_TestTool1_1'))
+print("env2['Toolpath_TestTool1_2'] =", env2.get('Toolpath_TestTool1_2'))
+print("env2['Toolpath_TestTool2_1'] =", env2.get('Toolpath_TestTool2_1'))
+print("env2['Toolpath_TestTool2_2'] =", env2.get('Toolpath_TestTool2_2'))
+
+print('Test a Clone')
+base = Environment(tools=[], toolpath=['Libs/tools_example'])
+derived = base.Clone(tools=['subdir1.Toolpath_TestTool1_1'])
+print("derived['Toolpath_TestTool1_1'] =", derived.get('Toolpath_TestTool1_1'))
+
+
+print('Test using syspath as the toolpath')
+print('Lets pretend that tools_example within Libs is actually a module installed via pip')
+oldsyspath = sys.path
+dir_path = Dir('.').srcnode().abspath
+dir_path = os.path.join(dir_path, 'Libs')
+sys.path.append(dir_path)
+
+toollist = ['tools_example.Toolpath_TestTool1',
+ 'tools_example.Toolpath_TestTool2',
+ 'tools_example.subdir1.Toolpath_TestTool1_1',
+ 'tools_example.subdir1.Toolpath_TestTool1_2',
+ 'tools_example.subdir1.subdir2.Toolpath_TestTool2_1',
+ 'tools_example.subdir1.subdir2.Toolpath_TestTool2_2',
+ ]
+
+env3 = Environment(tools=toollist, toolpath=sys.path)
+print("env3['Toolpath_TestTool1'] =", env3.get('Toolpath_TestTool1'))
+print("env3['Toolpath_TestTool2'] =", env3.get('Toolpath_TestTool2'))
+print("env3['Toolpath_TestTool1_1'] =", env3.get('Toolpath_TestTool1_1'))
+print("env3['Toolpath_TestTool1_2'] =", env3.get('Toolpath_TestTool1_2'))
+print("env3['Toolpath_TestTool2_1'] =", env3.get('Toolpath_TestTool2_1'))
+print("env3['Toolpath_TestTool2_2'] =", env3.get('Toolpath_TestTool2_2'))
-base = Environment(tools=[], toolpath=['tools'])
-derived = base.Clone(tools=['subdir1.Toolpath_TestTool1'])
-print("derived['Toolpath_TestTool1'] =", derived.get('Toolpath_TestTool1'))
+sys.path = oldsyspath
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool1.py b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py index d4a19a82..072daf0f 100644 --- a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Site_TestTool1.py +++ b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool1.py @@ -1,4 +1,4 @@ def generate(env):
- env['Site_TestTool1'] = 1
+ env['Toolpath_TestTool1'] = 1
def exists(env):
return 1
diff --git a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py index 26bc7482..f4ccefee 100644 --- a/test/toolpath/nested/image/tools/subdir1/Toolpath_TestTool3/__init__.py +++ b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/__init__.py @@ -1,4 +1,4 @@ def generate(env):
- env['Toolpath_TestTool3'] = 1
+ env['Toolpath_TestTool2'] = 1
def exists(env):
return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/sconstest.skip new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/Toolpath_TestTool2/sconstest.skip diff --git a/test/toolpath/nested/image/site_scons/site_tools/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/__init__.py diff --git a/test/toolpath/nested/image/site_scons/site_tools/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/sconstest.skip new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/sconstest.skip diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py new file mode 100644 index 00000000..2a70e678 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_1.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool1_1'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py new file mode 100644 index 00000000..424991f1 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/__init__.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool1_2'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/sconstest.skip new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/Toolpath_TestTool1_2/sconstest.skip diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py new file mode 100644 index 00000000..13d04963 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_1.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool2_1'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py new file mode 100644 index 00000000..3f8fd5e2 --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/__init__.py @@ -0,0 +1,4 @@ +def generate(env):
+ env['Toolpath_TestTool2_2'] = 1
+def exists(env):
+ return 1
diff --git a/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/toolpath/nested/image/site_scons/site_tools/subdir1/subdir2/Toolpath_TestTool2_2/sconstest.skip diff --git a/test/toolpath/nested/nested.py b/test/toolpath/nested/nested.py index 7304dd57..a736d587 100644 --- a/test/toolpath/nested/nested.py +++ b/test/toolpath/nested/nested.py @@ -33,13 +33,30 @@ test.dir_fixture('image') test.run(arguments = '.', stdout = """\ scons: Reading SConscript files ... -env1['Site_TestTool1'] = 1 -env1['Site_TestTool2'] = 1 -env1['Site_TestTool3'] = 1 +Test where tools are located under site_scons/site_tools +env1['Toolpath_TestTool1'] = 1 +env1['Toolpath_TestTool2'] = 1 +env1['Toolpath_TestTool1_1'] = 1 +env1['Toolpath_TestTool1_2'] = 1 +env1['Toolpath_TestTool2_1'] = 1 +env1['Toolpath_TestTool2_2'] = 1 +Test where toolpath is set in the env constructor env2['Toolpath_TestTool1'] = 1 env2['Toolpath_TestTool2'] = 1 -env2['Toolpath_TestTool3'] = 1 -derived['Toolpath_TestTool1'] = 1 +env2['Toolpath_TestTool1_1'] = 1 +env2['Toolpath_TestTool1_2'] = 1 +env2['Toolpath_TestTool2_1'] = 1 +env2['Toolpath_TestTool2_2'] = 1 +Test a Clone +derived['Toolpath_TestTool1_1'] = 1 +Test using syspath as the toolpath +Lets pretend that tools_example within Libs is actually a module installed via pip +env3['Toolpath_TestTool1'] = 1 +env3['Toolpath_TestTool2'] = 1 +env3['Toolpath_TestTool1_1'] = 1 +env3['Toolpath_TestTool1_2'] = 1 +env3['Toolpath_TestTool2_1'] = 1 +env3['Toolpath_TestTool2_2'] = 1 scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. |