diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-04-19 04:03:33 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-04-19 04:03:33 (GMT) |
commit | 18f73fb6ea41b50710dc40c10d6bf4ba9af7a02e (patch) | |
tree | 2ca0cc7560bc86f58f4a9ea2e52615f367815ed0 /src | |
parent | c8bbcb0d9b5d03a84e880d239857008b93eda8fe (diff) | |
parent | a72dc1246c42d37e35fc7838c4bc22298a5a3c0a (diff) | |
download | SCons-18f73fb6ea41b50710dc40c10d6bf4ba9af7a02e.zip SCons-18f73fb6ea41b50710dc40c10d6bf4ba9af7a02e.tar.gz SCons-18f73fb6ea41b50710dc40c10d6bf4ba9af7a02e.tar.bz2 |
py2/3 Fix re-raising stored exception. Previously we were dropping contents of Exception. Plus merge more complete removal of sccs and rcs source handling per deprecation/removal.
Diffstat (limited to 'src')
-rw-r--r-- | src/CHANGES.txt | 3 | ||||
-rw-r--r-- | src/engine/SCons/Node/FS.py | 78 | ||||
-rw-r--r-- | src/engine/SCons/Node/FSTests.py | 33 | ||||
-rw-r--r-- | src/engine/SCons/Taskmaster.py | 4 | ||||
-rw-r--r-- | src/engine/SCons/Tool/docbook/__init__.py | 4 |
5 files changed, 12 insertions, 110 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 2b0c3cd..2f46d4f 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -41,6 +41,9 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER From William Deegan: - Removed deprecated tools CVS, Perforce, BitKeeper, RCS, SCCS, Subversion. - Removed deprecated module SCons.Sig + - Added prioritized list of xsltproc tools to docbook. The order will now be as + follows: xsltproc, saxon, saxon-xslt, xalan (with first being highest priority, first + tool found is used) From Daniel Moody: - Fixed msvs.py for Visual Studio generated projects which were diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 8f26777..64b2e3f 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -351,33 +351,6 @@ class _Null(object): _null = _Null() -DefaultSCCSBuilder = None -DefaultRCSBuilder = None - -def get_DefaultSCCSBuilder(): - global DefaultSCCSBuilder - if DefaultSCCSBuilder is None: - import SCons.Builder - # "env" will get filled in by Executor.get_build_env() - # calling SCons.Defaults.DefaultEnvironment() when necessary. - act = SCons.Action.Action('$SCCSCOM', '$SCCSCOMSTR') - DefaultSCCSBuilder = SCons.Builder.Builder(action = act, - env = None, - name = "DefaultSCCSBuilder") - return DefaultSCCSBuilder - -def get_DefaultRCSBuilder(): - global DefaultRCSBuilder - if DefaultRCSBuilder is None: - import SCons.Builder - # "env" will get filled in by Executor.get_build_env() - # calling SCons.Defaults.DefaultEnvironment() when necessary. - act = SCons.Action.Action('$RCS_COCOM', '$RCS_COCOMSTR') - DefaultRCSBuilder = SCons.Builder.Builder(action = act, - env = None, - name = "DefaultRCSBuilder") - return DefaultRCSBuilder - # Cygwin's os.path.normcase pretends it's on a case-sensitive filesystem. _is_cygwin = sys.platform == "cygwin" if os.path.normcase("TeSt") == os.path.normpath("TeSt") and not _is_cygwin: @@ -422,46 +395,12 @@ def do_diskcheck_match(node, predicate, errorfmt): def ignore_diskcheck_match(node, predicate, errorfmt): pass -def do_diskcheck_rcs(node, name): - try: - rcs_dir = node.rcs_dir - except AttributeError: - if node.entry_exists_on_disk('RCS'): - rcs_dir = node.Dir('RCS') - else: - rcs_dir = None - node.rcs_dir = rcs_dir - if rcs_dir: - return rcs_dir.entry_exists_on_disk(name+',v') - return None - -def ignore_diskcheck_rcs(node, name): - return None - -def do_diskcheck_sccs(node, name): - try: - sccs_dir = node.sccs_dir - except AttributeError: - if node.entry_exists_on_disk('SCCS'): - sccs_dir = node.Dir('SCCS') - else: - sccs_dir = None - node.sccs_dir = sccs_dir - if sccs_dir: - return sccs_dir.entry_exists_on_disk('s.'+name) - return None -def ignore_diskcheck_sccs(node, name): - return None diskcheck_match = DiskChecker('match', do_diskcheck_match, ignore_diskcheck_match) -diskcheck_rcs = DiskChecker('rcs', do_diskcheck_rcs, ignore_diskcheck_rcs) -diskcheck_sccs = DiskChecker('sccs', do_diskcheck_sccs, ignore_diskcheck_sccs) diskcheckers = [ diskcheck_match, - diskcheck_rcs, - diskcheck_sccs, ] def set_diskcheck(list): @@ -982,8 +921,6 @@ class Entry(Base): 'root', 'dirname', 'on_disk_entries', - 'sccs_dir', - 'rcs_dir', 'released_target_info', 'contentsig'] @@ -1529,8 +1466,6 @@ class Dir(Base): 'root', 'dirname', 'on_disk_entries', - 'sccs_dir', - 'rcs_dir', 'released_target_info', 'contentsig'] @@ -2096,9 +2031,7 @@ class Dir(Base): return node def file_on_disk(self, name): - if self.entry_exists_on_disk(name) or \ - diskcheck_rcs(self, name) or \ - diskcheck_sccs(self, name): + if self.entry_exists_on_disk(name): try: return self.File(name) except TypeError: pass node = self.srcdir_duplicate(name) @@ -2595,8 +2528,6 @@ class File(Base): 'root', 'dirname', 'on_disk_entries', - 'sccs_dir', - 'rcs_dir', 'released_target_info', 'contentsig'] @@ -3037,12 +2968,7 @@ class File(Base): return None scb = self.dir.src_builder() if scb is _null: - if diskcheck_sccs(self.dir, self.name): - scb = get_DefaultSCCSBuilder() - elif diskcheck_rcs(self.dir, self.name): - scb = get_DefaultRCSBuilder() - else: - scb = None + scb = None if scb is not None: try: b = self.builder diff --git a/src/engine/SCons/Node/FSTests.py b/src/engine/SCons/Node/FSTests.py index 7366b7b..306f1a2 100644 --- a/src/engine/SCons/Node/FSTests.py +++ b/src/engine/SCons/Node/FSTests.py @@ -3269,18 +3269,11 @@ class has_src_builderTestCase(unittest.TestCase): fs = SCons.Node.FS.FS(test.workpath('')) os.chdir(test.workpath('')) test.subdir('sub1') - test.subdir('sub2', ['sub2', 'SCCS'], ['sub2', 'RCS']) sub1 = fs.Dir('sub1', '.') f1 = fs.File('f1', sub1) f2 = fs.File('f2', sub1) f3 = fs.File('f3', sub1) - sub2 = fs.Dir('sub2', '.') - f4 = fs.File('f4', sub2) - f5 = fs.File('f5', sub2) - f6 = fs.File('f6', sub2) - f7 = fs.File('f7', sub2) - f8 = fs.File('f8', sub2) h = f1.has_src_builder() assert not h, h @@ -3305,32 +3298,6 @@ class has_src_builderTestCase(unittest.TestCase): assert h, h assert f3.builder is b1, f3.builder - f7.set_src_builder(b1) - f8.builder_set(b1) - - test.write(['sub2', 'SCCS', 's.f5'], "sub2/SCCS/s.f5\n") - test.write(['sub2', 'RCS', 'f6,v'], "sub2/RCS/f6,v\n") - h = f4.has_src_builder() - assert not h, h - h = f4.has_builder() - assert not h, h - h = f5.has_src_builder() - assert h, h - h = f5.has_builder() - assert h, h - h = f6.has_src_builder() - assert h, h - h = f6.has_builder() - assert h, h - h = f7.has_src_builder() - assert h, h - h = f7.has_builder() - assert h, h - h = f8.has_src_builder() - assert not h, h - h = f8.has_builder() - assert h, h - class prepareTestCase(unittest.TestCase): def runTest(self): """Test the prepare() method""" diff --git a/src/engine/SCons/Taskmaster.py b/src/engine/SCons/Taskmaster.py index ec7b9f2..cf924e7 100644 --- a/src/engine/SCons/Taskmaster.py +++ b/src/engine/SCons/Taskmaster.py @@ -546,9 +546,11 @@ class Task(object): if sys.version_info[0] == 2: exec("raise exc_type, exc_value, exc_traceback") else: # sys.version_info[0] == 3: - exec("raise exc_type(exc_value).with_traceback(exc_traceback)") + exec("raise exc_value.with_traceback(exc_traceback)") # raise e.__class__, e.__class__(e), sys.exc_info()[2] + # exec("raise exc_type(exc_value).with_traceback(exc_traceback)") + class AlwaysTask(Task): diff --git a/src/engine/SCons/Tool/docbook/__init__.py b/src/engine/SCons/Tool/docbook/__init__.py index e805253..d3ea8ae 100644 --- a/src/engine/SCons/Tool/docbook/__init__.py +++ b/src/engine/SCons/Tool/docbook/__init__.py @@ -158,6 +158,10 @@ def __create_output_dir(base_dir): # Supported command line tools and their call "signature" # xsltproc_com_priority = ['xsltproc', 'saxon', 'saxon-xslt', 'xalan'] + +# TODO: Set minimum version of saxon-xslt to be 8.x (lower than this only supports xslt 1.0. +# see: http://saxon.sourceforge.net/saxon6.5.5/ +# see: http://saxon.sourceforge.net/ xsltproc_com = {'xsltproc' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE', 'saxon' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS', 'saxon-xslt' : '$DOCBOOK_XSLTPROC $DOCBOOK_XSLTPROCFLAGS -o $TARGET $DOCBOOK_XSL $SOURCE $DOCBOOK_XSLTPROCPARAMS', |