diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-05-28 09:40:40 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-05-28 09:40:40 (GMT) |
commit | 56309561f2396659965eda63b30c69043e17d3f6 (patch) | |
tree | 2a9eaf225729bc320b75e8f0f5f70872b3a72c8f /src/engine | |
parent | 1611fe9bdefe760e4fbfd0a4ae85892a3094e19e (diff) | |
download | SCons-56309561f2396659965eda63b30c69043e17d3f6.zip SCons-56309561f2396659965eda63b30c69043e17d3f6.tar.gz SCons-56309561f2396659965eda63b30c69043e17d3f6.tar.bz2 |
http://scons.tigris.org/issues/show_bug.cgi?id=2365
Start the deprecation cycle for SourceCode() and its related factory functions.
Deprecation messages are added to the functions. Regression tests are modified
to deal with the messages being generated. Documentation is updated.
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/SCons/Environment.py | 6 | ||||
-rw-r--r-- | src/engine/SCons/Tool/BitKeeper.py | 2 | ||||
-rw-r--r-- | src/engine/SCons/Tool/CVS.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/Perforce.py | 5 | ||||
-rw-r--r-- | src/engine/SCons/Tool/RCS.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/SCCS.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/Subversion.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 37 |
8 files changed, 37 insertions, 29 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 38a712e..b2ae4de 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -2045,9 +2045,9 @@ class Base(SubstitutionEnvironment): def SourceCode(self, entry, builder): """Arrange for a source code builder for (part of) a tree.""" - #msg = """SourceCode() has been deprecated and there is no replacement. -#\tIf you need this function, please contact dev@scons.tigris.org.""" - #SCons.Warnings.warn(SCons.Warnings.DeprecatedBuildDirWarning, msg) + msg = """SourceCode() has been deprecated and there is no replacement. +\tIf you need this function, please contact dev@scons.tigris.org.""" + SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceCodeWarning, msg) entries = self.arg2nodes(entry, self.fs.Entry) for entry in entries: entry.set_src_builder(builder) diff --git a/src/engine/SCons/Tool/BitKeeper.py b/src/engine/SCons/Tool/BitKeeper.py index 004ffeb..191879f 100644 --- a/src/engine/SCons/Tool/BitKeeper.py +++ b/src/engine/SCons/Tool/BitKeeper.py @@ -44,6 +44,8 @@ def generate(env): def BitKeeperFactory(env=env): """ """ + import SCons.Warnings as W + W.warn(W.DeprecatedSourceCodeWarning, """The BitKeeper() factory is deprecated and there is no replacement.""") act = SCons.Action.Action("$BITKEEPERCOM", "$BITKEEPERCOMSTR") return SCons.Builder.Builder(action = act, env = env) diff --git a/src/engine/SCons/Tool/CVS.py b/src/engine/SCons/Tool/CVS.py index e71635e..a506231 100644 --- a/src/engine/SCons/Tool/CVS.py +++ b/src/engine/SCons/Tool/CVS.py @@ -8,7 +8,6 @@ selection method. """ -# # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining @@ -29,7 +28,6 @@ selection method. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -43,6 +41,8 @@ def generate(env): def CVSFactory(repos, module='', env=env): """ """ + import SCons.Warnings as W + W.warn(W.DeprecatedSourceCodeWarning, """The CVS() factory is deprecated and there is no replacement.""") # fail if repos is not an absolute path name? if module != '': # Don't use os.path.join() because the name we fetch might diff --git a/src/engine/SCons/Tool/Perforce.py b/src/engine/SCons/Tool/Perforce.py index 8d30d12..15dd83f 100644 --- a/src/engine/SCons/Tool/Perforce.py +++ b/src/engine/SCons/Tool/Perforce.py @@ -8,7 +8,6 @@ selection method. """ -# # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining @@ -29,7 +28,6 @@ selection method. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -44,7 +42,6 @@ import SCons.Util from SCons.Tool.PharLapCommon import addPathIfNotExists - # Variables that we want to import from the base OS environment. _import_env = [ 'P4PORT', 'P4CLIENT', 'P4USER', 'USER', 'USERNAME', 'P4PASSWD', 'P4CHARSET', 'P4LANGUAGE', 'SystemRoot' ] @@ -57,6 +54,8 @@ def generate(env): def PerforceFactory(env=env): """ """ + import SCons.Warnings as W + W.warn(W.DeprecatedSourceCodeWarning, """The Perforce() factory is deprecated and there is no replacement.""") return SCons.Builder.Builder(action = PerforceAction, env = env) #setattr(env, 'Perforce', PerforceFactory) diff --git a/src/engine/SCons/Tool/RCS.py b/src/engine/SCons/Tool/RCS.py index bb4721b..6ac1a33 100644 --- a/src/engine/SCons/Tool/RCS.py +++ b/src/engine/SCons/Tool/RCS.py @@ -8,7 +8,6 @@ selection method. """ -# # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining @@ -29,7 +28,6 @@ selection method. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -43,6 +41,8 @@ def generate(env): def RCSFactory(env=env): """ """ + import SCons.Warnings as W + W.warn(W.DeprecatedSourceCodeWarning, """The RCS() factory is deprecated and there is no replacement.""") act = SCons.Action.Action('$RCS_COCOM', '$RCS_COCOMSTR') return SCons.Builder.Builder(action = act, env = env) diff --git a/src/engine/SCons/Tool/SCCS.py b/src/engine/SCons/Tool/SCCS.py index 99582e2..7653468 100644 --- a/src/engine/SCons/Tool/SCCS.py +++ b/src/engine/SCons/Tool/SCCS.py @@ -8,7 +8,6 @@ selection method. """ -# # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining @@ -29,7 +28,6 @@ selection method. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -43,6 +41,8 @@ def generate(env): def SCCSFactory(env=env): """ """ + import SCons.Warnings as W + W.warn(W.DeprecatedSourceCodeWarning, """The SCCS() factory is deprecated and there is no replacement.""") act = SCons.Action.Action('$SCCSCOM', '$SCCSCOMSTR') return SCons.Builder.Builder(action = act, env = env) diff --git a/src/engine/SCons/Tool/Subversion.py b/src/engine/SCons/Tool/Subversion.py index 05a8adb..ee70925 100644 --- a/src/engine/SCons/Tool/Subversion.py +++ b/src/engine/SCons/Tool/Subversion.py @@ -8,7 +8,6 @@ selection method. """ -# # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining @@ -29,7 +28,6 @@ selection method. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" @@ -46,6 +44,8 @@ def generate(env): def SubversionFactory(repos, module='', env=env): """ """ # fail if repos is not an absolute path name? + import SCons.Warnings as W + W.warn(W.DeprecatedSourceCodeWarning, """The Subversion() factory is deprecated and there is no replacement.""") if module != '': module = os.path.join(module, '') act = SCons.Action.Action('$SVNCOM', '$SVNCOMSTR') diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index 05f095f..9d9855b 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -645,21 +645,28 @@ def tool_list(platform, env): fortran_compiler = FindTool(fortran_compilers, env) or fortran_compilers[0] ar = FindTool(ars, env) or ars[0] - other_tools = FindAllTools(['BitKeeper', 'CVS', - 'dmd', - 'filesystem', - 'dvipdf', 'dvips', 'gs', - 'jar', 'javac', 'javah', - 'latex', 'lex', - 'm4', #'midl', 'msvs', - 'pdflatex', 'pdftex', 'Perforce', - 'RCS', 'rmic', 'rpcgen', - 'SCCS', - # 'Subversion', - 'swig', - 'tar', 'tex', - 'yacc', 'zip', 'rpm', 'wix']+other_plat_tools, - env) + other_tools = FindAllTools(other_plat_tools + [ + 'dmd', + #TODO: merge 'install' into 'filesystem' and + # make 'filesystem' the default + 'filesystem', + 'm4', + 'wix', #'midl', 'msvs', + # Parser generators + 'lex', 'yacc', + # Foreign function interface + 'rpcgen', 'swig', + # Java + 'jar', 'javac', 'javah', 'rmic', + # TeX + 'dvipdf', 'dvips', 'gs', + 'tex', 'latex', 'pdflatex', 'pdftex', + # Archivers + 'tar', 'zip', 'rpm', + # SourceCode factories + 'BitKeeper', 'CVS', 'Perforce', + 'RCS', 'SCCS', # 'Subversion', + ], env) tools = ([linker, c_compiler, cxx_compiler, fortran_compiler, assembler, ar] |