From 74207e0e31f375b33c313194ae64bcde459994f4 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Mon, 12 Jun 2017 18:44:21 +0100 Subject: Remove the static lib builder creation in the D tools. --- src/engine/SCons/Tool/dmd.py | 2 -- src/engine/SCons/Tool/gdc.py | 2 -- src/engine/SCons/Tool/ldc.py | 2 -- 3 files changed, 6 deletions(-) diff --git a/src/engine/SCons/Tool/dmd.py b/src/engine/SCons/Tool/dmd.py index 64beea5..1becc14 100644 --- a/src/engine/SCons/Tool/dmd.py +++ b/src/engine/SCons/Tool/dmd.py @@ -144,8 +144,6 @@ def generate(env): env['DSHLIBVERSION'] = '$SHLIBVERSION' env['DSHLIBVERSIONFLAGS'] = [] - SCons.Tool.createStaticLibBuilder(env) - env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder( action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -of$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS', emitter=DCommon.allAtOnceEmitter, diff --git a/src/engine/SCons/Tool/gdc.py b/src/engine/SCons/Tool/gdc.py index fdfe867..fc844aa 100644 --- a/src/engine/SCons/Tool/gdc.py +++ b/src/engine/SCons/Tool/gdc.py @@ -128,8 +128,6 @@ def generate(env): env['DSHLIBVERSION'] = '$SHLIBVERSION' env['DSHLIBVERSIONFLAGS'] = '$SHLIBVERSIONFLAGS' - SCons.Tool.createStaticLibBuilder(env) - env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder( action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -o $TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS', emitter=DCommon.allAtOnceEmitter, diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py index 215c3e7..dfa2d70 100644 --- a/src/engine/SCons/Tool/ldc.py +++ b/src/engine/SCons/Tool/ldc.py @@ -147,8 +147,6 @@ def generate(env): env['DSHLIBVERSION'] = '$SHLIBVERSION' env['DSHLIBVERSIONFLAGS'] = [] - SCons.Tool.createStaticLibBuilder(env) - env['BUILDERS']['ProgramAllAtOnce'] = SCons.Builder.Builder( action='$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -of=$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS', emitter=DCommon.allAtOnceEmitter, -- cgit v0.12 From 23433f501b055457cc82ed8536af48cd08ebf219 Mon Sep 17 00:00:00 2001 From: grbd Date: Tue, 13 Jun 2017 14:23:08 +0100 Subject: Added support for nested tools --- src/engine/SCons/Tool/__init__.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 61b7788..e15c2f3 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -118,6 +118,16 @@ class Tool(object): if hasattr(module, 'options'): self.options = module.options + def _load_dotted_module(self, short_name, full_name, searchpaths=None): + splitname = short_name.split('.') + index = 0 + srchpths = searchpaths + for item in splitname: + file, path, desc = imp.find_module(item, srchpths) + mod = imp.load_module(full_name, file, path, desc) + srchpths = [path] + return mod, file + def _tool_module(self): oldpythonpath = sys.path sys.path = self.toolpath + sys.path @@ -127,10 +137,10 @@ class Tool(object): # Py 2 code try: try: - file, path, desc = imp.find_module(self.name, self.toolpath) + file = None try: - return imp.load_module(self.name, file, path, desc) - + mod, file = self._load_dotted_module(self.name, self.name, self.toolpath) + return mod finally: if file: file.close() @@ -231,8 +241,7 @@ class Tool(object): try: smpath = sys.modules['SCons.Tool'].__path__ try: - file, path, desc = imp.find_module(self.name, smpath) - module = imp.load_module(full_name, file, path, desc) + module, file = self._load_dotted_module(self.name, full_name, smpath) setattr(SCons.Tool, self.name, module) if file: file.close() -- cgit v0.12 From e38f013a4006c6734d57057258b96ce1367554f0 Mon Sep 17 00:00:00 2001 From: grbd Date: Wed, 14 Jun 2017 02:08:48 +0100 Subject: Fix the loading of tools where the tool is a package instead of a module --- src/engine/SCons/Tool/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index e15c2f3..7eac0e0 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -189,6 +189,7 @@ class Tool(object): if debug: print("file_Path:%s FOUND"%file_path) break elif os.path.isdir(file_package): + file_package = os.path.join(file_package, '__init__.py') spec = importlib.util.spec_from_file_location(self.name, file_package) if debug: print("PACKAGE:%s Found"%file_package) break -- cgit v0.12 From a96ff49dee3669b25888e138916b6bb06c6dc363 Mon Sep 17 00:00:00 2001 From: grbd Date: Wed, 14 Jun 2017 02:26:58 +0100 Subject: Nested Tool support under python 3 --- src/engine/SCons/Tool/__init__.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 7eac0e0..876b1d2 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -118,7 +118,7 @@ class Tool(object): if hasattr(module, 'options'): self.options = module.options - def _load_dotted_module(self, short_name, full_name, searchpaths=None): + def _load_dotted_module_py2(self, short_name, full_name, searchpaths=None): splitname = short_name.split('.') index = 0 srchpths = searchpaths @@ -139,7 +139,7 @@ class Tool(object): try: file = None try: - mod, file = self._load_dotted_module(self.name, self.name, self.toolpath) + mod, file = self._load_dotted_module_py2(self.name, self.name, self.toolpath) return mod finally: if file: @@ -179,8 +179,9 @@ class Tool(object): found_name = self.name add_to_scons_tools_namespace = False for path in self.toolpath: - file_path = os.path.join(path, "%s.py"%self.name) - file_package = os.path.join(path, self.name) + sepname = self.name.replace('.', os.path.sep) + file_path = os.path.join(path, "%s.py"%sepname) + file_package = os.path.join(path, sepname) if debug: sys.stderr.write("Trying:%s %s\n"%(file_path, file_package)) @@ -242,7 +243,7 @@ class Tool(object): try: smpath = sys.modules['SCons.Tool'].__path__ try: - module, file = self._load_dotted_module(self.name, full_name, smpath) + module, file = self._load_dotted_module_py2(self.name, full_name, smpath) setattr(SCons.Tool, self.name, module) if file: file.close() -- cgit v0.12 From 87649e791c9241c2bf6149a16d780d525016afed Mon Sep 17 00:00:00 2001 From: grbd Date: Wed, 14 Jun 2017 19:07:44 +0100 Subject: Additional fix for nested tools under python2 --- src/engine/SCons/Tool/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 876b1d2..e5b4b05 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -145,7 +145,8 @@ class Tool(object): if file: file.close() except ImportError as e: - if str(e)!="No module named %s"%self.name: + splitname = self.name.split('.') + if str(e)!="No module named %s"%splitname[0]: raise SCons.Errors.EnvironmentError(e) try: import zipimport -- cgit v0.12 From 3015cd81aefb131028d00b9163155f6039f1e865 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sat, 17 Jun 2017 15:29:50 +0100 Subject: DMD and LDC do now support shared objects on MacOS. A couple of corrections. --- test/D/SharedObjects/Common/common.py | 5 +---- test/D/SharedObjects/Image/SConstruct_template | 7 ++----- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/test/D/SharedObjects/Common/common.py b/test/D/SharedObjects/Common/common.py index 0322385..a46ea7e 100644 --- a/test/D/SharedObjects/Common/common.py +++ b/test/D/SharedObjects/Common/common.py @@ -63,9 +63,6 @@ def testForTool(tool): elif platform == 'darwin': filename = 'code.o' libraryname = 'libanswer.dylib' - # As at 2014-09-14, DMD 2.066, LDC master head, and GDC 4.9.1 do not support - # shared libraries on OSX. - test.skip_test('Dynamic libraries not yet supported on OSX.\n') elif platform == 'win32': filename = 'code.obj' libraryname = 'answer.dll' @@ -75,7 +72,7 @@ def testForTool(tool): test.dir_fixture('Image') test.write('SConstruct', open('SConstruct_template', 'r').read().format(tool)) - if tool == 'dmd': + if Base()['DC'] == 'gdmd': # The gdmd executable in Debian Unstable as at 2012-05-12, version 4.6.3 puts out messages on stderr # that cause inappropriate failure of the tests, so simply ignore them. test.run(stderr=None) diff --git a/test/D/SharedObjects/Image/SConstruct_template b/test/D/SharedObjects/Image/SConstruct_template index cae8713..d263e63 100644 --- a/test/D/SharedObjects/Image/SConstruct_template +++ b/test/D/SharedObjects/Image/SConstruct_template @@ -1,10 +1,7 @@ # -*- mode:python; coding:utf-8; -*- -import os - environment = Environment( - tools=['{}', 'link']) - -environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd + tools=['{0}', 'link'] +) environment.SharedLibrary('answer', 'code.d') -- cgit v0.12 From f57360b60c20eacb2b39485a3986a79a823a2e67 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sat, 17 Jun 2017 15:40:47 +0100 Subject: Always provide a value for DC, never leave it unset: Detect can fail to find an executable. --- src/engine/SCons/Tool/dmd.py | 2 +- src/engine/SCons/Tool/gdc.py | 2 +- src/engine/SCons/Tool/ldc.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/SCons/Tool/dmd.py b/src/engine/SCons/Tool/dmd.py index 64beea5..783640b 100644 --- a/src/engine/SCons/Tool/dmd.py +++ b/src/engine/SCons/Tool/dmd.py @@ -75,7 +75,7 @@ def generate(env): static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter) shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter) - env['DC'] = env.Detect(['dmd', 'gdmd']) + env['DC'] = env.Detect(['dmd', 'ldmd2', 'gdmd']) or 'dmd' env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -of$TARGET $SOURCES' env['_DINCFLAGS'] = '${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}' env['_DVERFLAGS'] = '${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)}' diff --git a/src/engine/SCons/Tool/gdc.py b/src/engine/SCons/Tool/gdc.py index fdfe867..f519428 100644 --- a/src/engine/SCons/Tool/gdc.py +++ b/src/engine/SCons/Tool/gdc.py @@ -65,7 +65,7 @@ def generate(env): static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter) shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter) - env['DC'] = env.Detect('gdc') + env['DC'] = 'gdc' env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -o $TARGET $SOURCES' env['_DINCFLAGS'] = '${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}' env['_DVERFLAGS'] = '${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)}' diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py index 215c3e7..7e5d339 100644 --- a/src/engine/SCons/Tool/ldc.py +++ b/src/engine/SCons/Tool/ldc.py @@ -70,7 +70,7 @@ def generate(env): static_obj.add_emitter('.d', SCons.Defaults.StaticObjectEmitter) shared_obj.add_emitter('.d', SCons.Defaults.SharedObjectEmitter) - env['DC'] = env.Detect('ldc2') + env['DC'] = 'ldc2' env['DCOM'] = '$DC $_DINCFLAGS $_DVERFLAGS $_DDEBUGFLAGS $_DFLAGS -c -of=$TARGET $SOURCES' env['_DINCFLAGS'] = '${_concat(DINCPREFIX, DPATH, DINCSUFFIX, __env__, RDirs, TARGET, SOURCE)}' env['_DVERFLAGS'] = '${_concat(DVERPREFIX, DVERSIONS, DVERSUFFIX, __env__)}' -- cgit v0.12 From 9457abb8761928c02c68a1b923bbc16fda9bb2bd Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sun, 18 Jun 2017 15:14:54 +0100 Subject: LDC does not automatically include the druntime library as dmd does. --- src/engine/SCons/Tool/ldc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py index 7e5d339..ecc3b9e 100644 --- a/src/engine/SCons/Tool/ldc.py +++ b/src/engine/SCons/Tool/ldc.py @@ -111,7 +111,7 @@ def generate(env): env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos-ldc') #### END DEPRECATION 2017-05-21 - env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' + env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS -L-ldruntime-ldc' env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l' env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else '' -- cgit v0.12 From 5729b712bb37571a870f5c3e12a99fddfbf18536 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sun, 18 Jun 2017 17:31:56 +0100 Subject: Correct the rpath prefix for LDC on Darwin. --- src/engine/SCons/Tool/ldc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py index 7e5d339..dc56ad8 100644 --- a/src/engine/SCons/Tool/ldc.py +++ b/src/engine/SCons/Tool/ldc.py @@ -111,7 +111,7 @@ def generate(env): env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos-ldc') #### END DEPRECATION 2017-05-21 - env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS' + env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DSHLIBVERSIONFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS -L-ldruntime-ldc' env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l' env['DLIBLINKSUFFIX'] = '.lib' if env['PLATFORM'] == 'win32' else '' @@ -132,7 +132,7 @@ def generate(env): # __RPATH is set to $_RPATH in the platform specification if that # platform supports it. - env['DRPATHPREFIX'] = '-L-rpath=' + env['DRPATHPREFIX'] = '-L-Wl,-rpath,' if env['PLATFORM'] == 'darwin' else '-L-rpath=' env['DRPATHSUFFIX'] = '' env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}' -- cgit v0.12 From 04796d463904ce278ed09e58517467d8047945f8 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sun, 18 Jun 2017 17:35:25 +0100 Subject: Attempt a fix for dmd rpath on OSX. --- src/engine/SCons/Tool/dmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/SCons/Tool/dmd.py b/src/engine/SCons/Tool/dmd.py index 783640b..813f949 100644 --- a/src/engine/SCons/Tool/dmd.py +++ b/src/engine/SCons/Tool/dmd.py @@ -129,7 +129,7 @@ def generate(env): # __RPATH is set to $_RPATH in the platform specification if that # platform supports it. - env['DRPATHPREFIX'] = '-L-rpath=' + env['DRPATHPREFIX'] = '-L-rpath,' if env['PLATFORM'] == 'darwin' else '-L-rpath=' env['DRPATHSUFFIX'] = '' env['_DRPATH'] = '${_concat(DRPATHPREFIX, RPATH, DRPATHSUFFIX, __env__)}' -- cgit v0.12 From b3c1a8d197c0353206f14782921e27d3534ec1e3 Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sun, 18 Jun 2017 17:35:47 +0100 Subject: LDC shared libraries work on OSX. --- test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py b/test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py index 8060add..2bcff1e 100644 --- a/test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py +++ b/test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py @@ -50,11 +50,10 @@ def testForTool(tool): libraryname = 'libstuff.so' filename = 'stuff.os' elif platform == 'darwin': + if tool == 'gdc': + test.skip_test('Dynamic libraries not yet supported by dmd and gdc on OSX.\n') libraryname = 'libstuff.dylib' filename = 'stuff.os' - # As at 2014-09-14, DMD 2.066, LDC master head, and GDC 4.9.1 do not support - # shared libraries on OSX. - test.skip_test('Dynamic libraries not yet supported on OSX.\n') elif platform == 'win32': libraryname = 'stuff.dll' filename = 'stuff.obj' -- cgit v0.12 From fda72fd3c1516012ff9d04fb260037fd1bc16abc Mon Sep 17 00:00:00 2001 From: Russel Winder Date: Sun, 18 Jun 2017 19:04:54 +0100 Subject: Remove DMD from the tests on OSX till the correct rpath option is discovered. --- test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py b/test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py index 2bcff1e..5acd26a 100644 --- a/test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py +++ b/test/D/Issues/2940_Ariovistus/Common/correctLinkOptions.py @@ -50,7 +50,7 @@ def testForTool(tool): libraryname = 'libstuff.so' filename = 'stuff.os' elif platform == 'darwin': - if tool == 'gdc': + if tool == 'dmd' or tool == 'gdc': test.skip_test('Dynamic libraries not yet supported by dmd and gdc on OSX.\n') libraryname = 'libstuff.dylib' filename = 'stuff.os' -- cgit v0.12 From a25367b4f6151a7888b9446e45e234ed84c9a163 Mon Sep 17 00:00:00 2001 From: grbd Date: Mon, 19 Jun 2017 15:45:03 +0100 Subject: Updated the documentation for nested tools located within subdirs --- doc/man/scons.xml | 16 +++++++++++++++ doc/user/builders-writing.xml | 47 +++++++++++++++++++++++++++++++++++++++++++ src/CHANGES.txt | 4 ++++ 3 files changed, 67 insertions(+) diff --git a/doc/man/scons.xml b/doc/man/scons.xml index b68f27a..3268860 100644 --- a/doc/man/scons.xml +++ b/doc/man/scons.xml @@ -2187,6 +2187,22 @@ platform name when the Environment is constructed. Changing the PATH variable after the Environment is constructed will not cause the tools to be redetected. + One feature now present within Scons is the ability to have nested tools. +Tools which can be located within a subdirectory in the toolpath. +With a nested tool name the dot represents a directory seperator + + +# namespaced builder +env = Environment(ENV = os.environ, tools = ['SubDir1.SubDir2.SomeTool']) +env.SomeTool(targets, sources) + +# Search Paths +# 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 + + SCons supports the following tool specifications out of the box: diff --git a/doc/user/builders-writing.xml b/doc/user/builders-writing.xml index 07f2dec..35dd989 100644 --- a/doc/user/builders-writing.xml +++ b/doc/user/builders-writing.xml @@ -880,6 +880,53 @@ env2.Foo('file2') +
+ Nested and namespace builders; + + + &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 + + + +# Regular non namespace target +env = Environment(ENV = os.environ, tools = ['SomeTool']) +env.SomeTool(targets, sources) + + + + The locations would include + SCons\Tool\SomeTool.py + SCons\Tool\SomeTool\__init__.py + .\site_scons\site_tools\SomeTool.py + .\site_scons\site_tools\SomeTool\__init__.py + + 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 + + + +# namespaced target +env = Environment(ENV = os.environ, tools = ['SubDir1.SubDir2.SomeTool']) +env.SomeTool(targets, sources) + + + + With this example the search locations would include + 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 + + 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). + + +
+