diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-03-20 17:57:39 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-03-20 17:57:39 (GMT) |
commit | b66404ee6d63522fe35b056cb7940531caafa804 (patch) | |
tree | dc6c195e2e9259fb1ed61885b10310852e2941ec /src | |
parent | 6d602edd0c5f55e061d6f46aec06098d6a9e484b (diff) | |
download | SCons-b66404ee6d63522fe35b056cb7940531caafa804.zip SCons-b66404ee6d63522fe35b056cb7940531caafa804.tar.gz SCons-b66404ee6d63522fe35b056cb7940531caafa804.tar.bz2 |
remove deprecated Perforce tool
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Tool/Perforce.py | 99 | ||||
-rw-r--r-- | src/engine/SCons/Tool/Perforce.xml | 129 | ||||
-rw-r--r-- | src/engine/SCons/Tool/__init__.py | 2 |
4 files changed, 4 insertions, 229 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index d6eed68..67bd2a3 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -29,6 +29,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER - Updated Fortran-related tests to pass under GCC 5/6. - Fixed SCons.Tool.Packaging.rpm.package source nondeterminism across builds. + From William Deegan: + - Removed deprecated source code tool Perforce. + From Daniel Moody: - Fixed msvs.py for Visual Studio generated projects which were creating invalid xml for greater than and less than symbols. diff --git a/src/engine/SCons/Tool/Perforce.py b/src/engine/SCons/Tool/Perforce.py deleted file mode 100644 index c8cf931..0000000 --- a/src/engine/SCons/Tool/Perforce.py +++ /dev/null @@ -1,99 +0,0 @@ -"""SCons.Tool.Perforce.py - -Tool-specific initialization for Perforce Source Code Management system. - -There normally shouldn't be any need to import this module directly. -It will usually be imported through the generic SCons.Tool.Tool() -selection method. - -""" - -# __COPYRIGHT__ -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# 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__" - -import os - -import SCons.Action -import SCons.Builder -import SCons.Node.FS -import SCons.Util - - -# Variables that we want to import from the base OS environment. -_import_env = [ 'P4PORT', 'P4CLIENT', 'P4USER', 'USER', 'USERNAME', 'P4PASSWD', - 'P4CHARSET', 'P4LANGUAGE', 'SystemRoot' ] - -PerforceAction = SCons.Action.Action('$P4COM', '$P4COMSTR') - -def generate(env): - """Add a Builder factory function and construction variables for - Perforce to an Environment.""" - - 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) - - env.Perforce = PerforceFactory - - env['P4'] = 'p4' - env['P4FLAGS'] = SCons.Util.CLVar('') - env['P4COM'] = '$P4 $P4FLAGS sync $TARGET' - try: - environ = env['ENV'] - except KeyError: - environ = {} - env['ENV'] = environ - - # Perforce seems to use the PWD environment variable rather than - # calling getcwd() for itself, which is odd. If no PWD variable - # is present, p4 WILL call getcwd, but this seems to cause problems - # with good ol' Windows's tilde-mangling for long file names. - environ['PWD'] = env.Dir('#').get_abspath() - - for var in _import_env: - v = os.environ.get(var) - if v: - environ[var] = v - - if SCons.Util.can_read_reg: - # If we can read the registry, add the path to Perforce to our environment. - try: - k=SCons.Util.RegOpenKeyEx(SCons.Util.hkey_mod.HKEY_LOCAL_MACHINE, - 'Software\\Perforce\\environment') - val, tok = SCons.Util.RegQueryValueEx(k, 'P4INSTROOT') - SCons.Util.AddPathIfNotExists(environ, 'PATH', val) - except SCons.Util.RegError: - # Can't detect where Perforce is, hope the user has it set in the - # PATH. - pass - -def exists(env): - return env.Detect('p4') - -# Local Variables: -# tab-width:4 -# indent-tabs-mode:nil -# End: -# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/src/engine/SCons/Tool/Perforce.xml b/src/engine/SCons/Tool/Perforce.xml deleted file mode 100644 index 918bbc9..0000000 --- a/src/engine/SCons/Tool/Perforce.xml +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -__COPYRIGHT__ - -This file is processed by the bin/SConsDoc.py module. -See its __doc__ string for a discussion of the format. ---> - -<!DOCTYPE sconsdoc [ -<!ENTITY % scons SYSTEM '../../../../doc/scons.mod'> -%scons; -<!ENTITY % builders-mod SYSTEM '../../../../doc/generated/builders.mod'> -%builders-mod; -<!ENTITY % functions-mod SYSTEM '../../../../doc/generated/functions.mod'> -%functions-mod; -<!ENTITY % tools-mod SYSTEM '../../../../doc/generated/tools.mod'> -%tools-mod; -<!ENTITY % variables-mod SYSTEM '../../../../doc/generated/variables.mod'> -%variables-mod; -]> - -<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd"> - -<tool name="Perforce"> -<summary> -<para> -Sets construction variables for interacting with the -Perforce source code management system. -</para> -</summary> -<sets> -<item>P4</item> -<item>P4FLAGS</item> -<item>P4COM</item> -</sets> -<uses> -<item>P4COMSTR</item> -</uses> -</tool> - -<cvar name="P4"> -<summary> -<para> -The Perforce executable. -</para> -</summary> -</cvar> - -<cvar name="P4COM"> -<summary> -<para> -The command line used to -fetch source files from Perforce. -</para> -</summary> -</cvar> - -<cvar name="P4COMSTR"> -<summary> -<para> -The string displayed when -fetching a source file from Perforce. -If this is not set, then &cv-link-P4COM; (the command line) is displayed. -</para> -</summary> -</cvar> - -<cvar name="P4FLAGS"> -<summary> -<para> -General options that are passed to Perforce. -</para> -</summary> -</cvar> - -<scons_function name="Perforce"> -<arguments signature="env"> -() -</arguments> -<summary> -<para> -A factory function that -returns a Builder object -to be used to fetch source files -from the Perforce source code management system. -The returned Builder -is intended to be passed to the -&f-SourceCode; -function. -</para> - -<para> -This function is deprecated. For details, see the entry for the -&f-SourceCode; -function. -</para> - -<para> -Example: -</para> - -<example_commands> -env.SourceCode('.', env.Perforce()) -</example_commands> - -<para> -Perforce uses a number of external -environment variables for its operation. -Consequently, this function adds the -following variables from the user's external environment -to the construction environment's -ENV dictionary: -P4CHARSET, -P4CLIENT, -P4LANGUAGE, -P4PASSWD, -P4PORT, -P4USER, -SystemRoot, -USER, -and -USERNAME. -</para> -</summary> -</scons_function> - -</sconsdoc> diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py index dbc6d0c..4647587 100644 --- a/src/engine/SCons/Tool/__init__.py +++ b/src/engine/SCons/Tool/__init__.py @@ -1157,7 +1157,7 @@ def tool_list(platform, env): # Archivers 'tar', 'zip', # SourceCode factories - 'BitKeeper', 'CVS', 'Perforce', + 'BitKeeper', 'CVS', 'RCS', 'SCCS', # 'Subversion', ], env) |