summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorptomulik <ptomulik@meil.pw.edu.pl>2012-06-06 22:39:50 +0200
committerptomulik <ptomulik@meil.pw.edu.pl>2012-06-06 22:39:50 +0200
commitc25b61cf71b6bd50789860e24eb5e1feec8177be (patch)
tree66ea8b3fef4018bad0863cd7c5a1e4299c57839b
parentb6bb6b399d6edc8ec21937faf400b5b94b306519 (diff)
downloadscons-c25b61cf71b6bd50789860e24eb5e1feec8177be.tar.gz
Corrections corrections corrections ..
-rw-r--r--src/engine/SCons/Tool/GettextCommon.py25
-rw-r--r--src/engine/SCons/Tool/gettext.py4
-rw-r--r--src/engine/SCons/Tool/gettext.xml7
-rw-r--r--src/engine/SCons/Tool/msgfmt.py6
-rw-r--r--test/GETTEXT/Translate_doc_user_examples1.py9
-rw-r--r--test/GETTEXT/Translate_doc_user_examples2.py9
-rw-r--r--test/GETTEXT/Translate_doc_user_examples3.py9
-rw-r--r--test/GETTEXT/doc_user_examples1.py9
-rw-r--r--test/MSGFMT/MOFile_doc_user_examples1.py2
-rw-r--r--test/MSGFMT/MOFile_doc_user_examples2.py2
-rw-r--r--test/MSGFMT/MOFile_doc_user_examples3.py2
-rw-r--r--test/MSGFMT/MOFile_doc_user_examples4.py2
-rw-r--r--test/MSGINIT/POinit_doc_user_examples1.py2
-rw-r--r--test/MSGINIT/POinit_doc_user_examples2.py2
-rw-r--r--test/MSGINIT/POinit_doc_user_examples3.py2
-rw-r--r--test/MSGINIT/POinit_doc_user_examples4.py2
-rw-r--r--test/MSGINIT/POinit_doc_user_examples5.py2
-rw-r--r--test/MSGINIT/POinit_doc_user_examples6.py2
-rw-r--r--test/MSGMERGE/POUpdate_doc_user_examples1.py2
-rw-r--r--test/MSGMERGE/POUpdate_doc_user_examples2.py2
-rw-r--r--test/MSGMERGE/POUpdate_doc_user_examples3.py2
-rw-r--r--test/MSGMERGE/POUpdate_doc_user_examples4.py2
-rw-r--r--test/MSGMERGE/POUpdate_doc_user_examples5.py2
-rw-r--r--test/MSGMERGE/POUpdate_doc_user_examples6.py2
-rw-r--r--test/MSGMERGE/POUpdate_doc_user_examples8.py2
-rw-r--r--test/XGETTEXT/POTUpdate_doc_user_examples1.py2
-rw-r--r--test/XGETTEXT/POTUpdate_doc_user_examples2.py2
-rw-r--r--test/XGETTEXT/POTUpdate_doc_user_examples3.py2
-rw-r--r--test/XGETTEXT/POTUpdate_doc_user_examples4.py2
-rw-r--r--test/XGETTEXT/POTUpdate_doc_user_examples5.py7
30 files changed, 25 insertions, 102 deletions
diff --git a/src/engine/SCons/Tool/GettextCommon.py b/src/engine/SCons/Tool/GettextCommon.py
index d786015b..66ab57c7 100644
--- a/src/engine/SCons/Tool/GettextCommon.py
+++ b/src/engine/SCons/Tool/GettextCommon.py
@@ -54,8 +54,8 @@ class _POTargetFactory(object):
""" A factory of `PO` target files.
Factory defaults differ from these of `SCons.Node.FS.FS`. We set `precious`
- (this is required by builders and actions in `SConsToolGettext`) and
- `noclean` flags by default for all produced nodes.
+ (this is required by builders and actions gettext) and `noclean` flags by
+ default for all produced nodes.
"""
def __init__( self, env, nodefault = True, alias = None, precious = True
, noclean = True ):
@@ -239,17 +239,16 @@ class RPaths(object):
It seems like `SCons.Node.FS.Base.get_path()` returns absolute paths
for nodes that are outside of current working directory (`env.fs.getcwd()`).
- In `SConsToolGettext` way we often have `SConscript`, `POT` and `PO` files
- within `po/` directory and source files (e.g. `*.c`) outside of it. When
- generating `POT` template file, references to source files are written to
- `POT` template, so a translator may later quickly jump to appropriate source
- file and line from its `PO` editor (e.g. `poedit`). Relative paths in
- `PO` file are usually interpreted by `PO` editor as paths relative to the
- place, where `PO` file lives. The absolute paths would make resultant `POT`
- file nonportable, as the references would be correct only on the machine,
- where `POT` file was recently re-created. For such reason, we need a
- function, which always returns relative paths. This is the purpose of
- `RPaths` callable object.
+ Here, we often have `SConscript`, `POT` and `PO` files within `po/`
+ directory and source files (e.g. `*.c`) outside of it. When generating `POT`
+ template file, references to source files are written to `POT` template, so
+ a translator may later quickly jump to appropriate source file and line from
+ its `PO` editor (e.g. `poedit`). Relative paths in `PO` file are usually
+ interpreted by `PO` editor as paths relative to the place, where `PO` file
+ lives. The absolute paths would make resultant `POT` file nonportable, as
+ the references would be correct only on the machine, where `POT` file was
+ recently re-created. For such reason, we need a function, which always
+ returns relative paths. This is the purpose of `RPaths` callable object.
The `__call__` method returns paths relative to current woking directory, but
we assume, that *xgettext(1)* is run from the directory, where target file is
diff --git a/src/engine/SCons/Tool/gettext.py b/src/engine/SCons/Tool/gettext.py
index 1055087a..8dfdecf2 100644
--- a/src/engine/SCons/Tool/gettext.py
+++ b/src/engine/SCons/Tool/gettext.py
@@ -28,7 +28,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
#############################################################################
def generate(env,**kw):
import SCons.Tool
- from SConsToolGettext.GettextCommon \
+ from SCons.Tool.GettextCommon \
import _translate, _install_mo_files, tool_list
for t in tool_list(env['PLATFORM'], env):
env.Tool(t)
@@ -39,7 +39,7 @@ def generate(env,**kw):
#############################################################################
def exists(env):
- from SConsToolGettext.GettextCommon \
+ from SCons.Tool.GettextCommon \
import _xgettext_exists, _msginit_exists, \
_msgmerge_exists, _msgfmt_exists
return _xgettext_exists(env) and _msginit_exists(env) \
diff --git a/src/engine/SCons/Tool/gettext.xml b/src/engine/SCons/Tool/gettext.xml
index db76cc97..2c6f1ae4 100644
--- a/src/engine/SCons/Tool/gettext.xml
+++ b/src/engine/SCons/Tool/gettext.xml
@@ -36,9 +36,8 @@ perform particular activities related to software internationalization. You
may be however interested in <emphasis>top-level</emphasis> builders
&b-Translate; and &b-InstallMOFiles; described few paragraphs later.
-To use &t-gettext; tools, copy <filename>SConsToolGettext</filename>
-folder to your <filename>site_scons/</filename> and simply add
-<literal>'gettext'</literal> tool to your environment:
+To use &t-gettext; tools add <literal>'gettext'</literal> tool to your
+environment:
<example>
env = Environment( tools = ['default', 'gettext'] )
</example>
@@ -207,7 +206,7 @@ not defined), the builders use <filename>messages.pot</filename> as default
<cvar name="POAUTOINIT">
<summary>
The &cv-POAUTOINIT; variable, if set to <literal>True</literal> (on non-zero
-numeric value), let the SConsToolGettext to automatically initialize
+numeric value), let the &t-link-msginit; tool to automatically initialize
<emphasis>missing</emphasis> <literal>PO</literal> files with
<command>msginit(1)</command>. This applies to both,
&b-link-POInit; and &b-link-POUpdate; builders (and others that use any of
diff --git a/src/engine/SCons/Tool/msgfmt.py b/src/engine/SCons/Tool/msgfmt.py
index ce8cff8d..f5cdb8f3 100644
--- a/src/engine/SCons/Tool/msgfmt.py
+++ b/src/engine/SCons/Tool/msgfmt.py
@@ -29,9 +29,9 @@ class _MOFileBuilder(BuilderBase):
""" The builder class for `MO` files.
The reason for this builder to exists and its purpose is quite simillar
- as for `SConsToolGettext._POFileBuilder`. This time, we extend list of
- sources, not targets, and call `BuilderBase._execute()` only once (as we
- assume single-target here).
+ as for `_POFileBuilder`. This time, we extend list of sources, not targets,
+ and call `BuilderBase._execute()` only once (as we assume single-target
+ here).
"""
def _execute(self, env, target, source, *args, **kw):
diff --git a/test/GETTEXT/Translate_doc_user_examples1.py b/test/GETTEXT/Translate_doc_user_examples1.py
index 946f18be..96a6c2cc 100644
--- a/test/GETTEXT/Translate_doc_user_examples1.py
+++ b/test/GETTEXT/Translate_doc_user_examples1.py
@@ -31,10 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-# NOTE: When integrating into upstream SCons development tree, remove the next
-# line, and the "toolpath = ..." line
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
@@ -42,10 +38,7 @@ test = TestSCons.TestSCons()
test.subdir('po/')
test.write('po/SConstruct',
"""
-env = Environment(
- toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ["default", "gettext"]
-)
+env = Environment( tools = ["default", "gettext"] )
env['POAUTOINIT'] = 1
env.Translate(['en','pl'], ['../a.cpp','../b.cpp'])
""")
diff --git a/test/GETTEXT/Translate_doc_user_examples2.py b/test/GETTEXT/Translate_doc_user_examples2.py
index 51464d44..7fffb868 100644
--- a/test/GETTEXT/Translate_doc_user_examples2.py
+++ b/test/GETTEXT/Translate_doc_user_examples2.py
@@ -31,10 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-# NOTE: When integrating into upstream SCons development tree, remove the next
-# line, and the "toolpath = ..." line
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
@@ -42,10 +38,7 @@ test = TestSCons.TestSCons()
test.subdir('po/')
test.write('po/SConstruct',
"""
-env = Environment(
- toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ["default", "gettext"]
-)
+env = Environment( tools = ["default", "gettext"] )
env['POAUTOINIT'] = 1
env['XGETTEXTPATH'] = ['../']
env.Translate(LINGUAS_FILE = 1, XGETTEXTFROM = 'POTFILES.in')
diff --git a/test/GETTEXT/Translate_doc_user_examples3.py b/test/GETTEXT/Translate_doc_user_examples3.py
index 6a93b5ee..d0995239 100644
--- a/test/GETTEXT/Translate_doc_user_examples3.py
+++ b/test/GETTEXT/Translate_doc_user_examples3.py
@@ -31,10 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-# NOTE: When integrating into upstream SCons development tree, remove the next
-# line, and the "toolpath = ..." line
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
@@ -42,10 +38,7 @@ test = TestSCons.TestSCons()
test.subdir('src', ['src', 'po'], 'build')
test.write('SConstruct',
"""
-env = Environment(
- toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ["default", "gettext"]
-)
+env = Environment( tools = ["default", "gettext"] )
VariantDir('build', 'src', duplicate = 0)
env['POAUTOINIT'] = 1
SConscript('src/po/SConscript.i18n', exports = 'env')
diff --git a/test/GETTEXT/doc_user_examples1.py b/test/GETTEXT/doc_user_examples1.py
index 3d05a215..bf210a1b 100644
--- a/test/GETTEXT/doc_user_examples1.py
+++ b/test/GETTEXT/doc_user_examples1.py
@@ -31,20 +31,13 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-# NOTE: When integrating into upstream SCons development tree, remove the next
-# line, and the "toolpath = ..." line
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
test.write('SConstruct',
"""
-env = Environment(
- toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ["default", "gettext"]
-)
+env = Environment( tools = ["default", "gettext"] )
""")
test.run(arguments = '.')
diff --git a/test/MSGFMT/MOFile_doc_user_examples1.py b/test/MSGFMT/MOFile_doc_user_examples1.py
index 71b5996c..d1b7982c 100644
--- a/test/MSGFMT/MOFile_doc_user_examples1.py
+++ b/test/MSGFMT/MOFile_doc_user_examples1.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGFMT/MOFile_doc_user_examples2.py b/test/MSGFMT/MOFile_doc_user_examples2.py
index ad67b3e6..ab373696 100644
--- a/test/MSGFMT/MOFile_doc_user_examples2.py
+++ b/test/MSGFMT/MOFile_doc_user_examples2.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGFMT/MOFile_doc_user_examples3.py b/test/MSGFMT/MOFile_doc_user_examples3.py
index e7cc0ff0..3eae629d 100644
--- a/test/MSGFMT/MOFile_doc_user_examples3.py
+++ b/test/MSGFMT/MOFile_doc_user_examples3.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGFMT/MOFile_doc_user_examples4.py b/test/MSGFMT/MOFile_doc_user_examples4.py
index 8737b2b0..6be47079 100644
--- a/test/MSGFMT/MOFile_doc_user_examples4.py
+++ b/test/MSGFMT/MOFile_doc_user_examples4.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGINIT/POinit_doc_user_examples1.py b/test/MSGINIT/POinit_doc_user_examples1.py
index 9082a11f..b69e58fd 100644
--- a/test/MSGINIT/POinit_doc_user_examples1.py
+++ b/test/MSGINIT/POinit_doc_user_examples1.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGINIT/POinit_doc_user_examples2.py b/test/MSGINIT/POinit_doc_user_examples2.py
index a96d921f..5832d67b 100644
--- a/test/MSGINIT/POinit_doc_user_examples2.py
+++ b/test/MSGINIT/POinit_doc_user_examples2.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGINIT/POinit_doc_user_examples3.py b/test/MSGINIT/POinit_doc_user_examples3.py
index f21f8745..3f971c94 100644
--- a/test/MSGINIT/POinit_doc_user_examples3.py
+++ b/test/MSGINIT/POinit_doc_user_examples3.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGINIT/POinit_doc_user_examples4.py b/test/MSGINIT/POinit_doc_user_examples4.py
index 2bcb68ec..903a2acb 100644
--- a/test/MSGINIT/POinit_doc_user_examples4.py
+++ b/test/MSGINIT/POinit_doc_user_examples4.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGINIT/POinit_doc_user_examples5.py b/test/MSGINIT/POinit_doc_user_examples5.py
index c3971e72..bd389505 100644
--- a/test/MSGINIT/POinit_doc_user_examples5.py
+++ b/test/MSGINIT/POinit_doc_user_examples5.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGINIT/POinit_doc_user_examples6.py b/test/MSGINIT/POinit_doc_user_examples6.py
index bf694fae..9e5f1895 100644
--- a/test/MSGINIT/POinit_doc_user_examples6.py
+++ b/test/MSGINIT/POinit_doc_user_examples6.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGMERGE/POUpdate_doc_user_examples1.py b/test/MSGMERGE/POUpdate_doc_user_examples1.py
index d925568c..dd7b41ac 100644
--- a/test/MSGMERGE/POUpdate_doc_user_examples1.py
+++ b/test/MSGMERGE/POUpdate_doc_user_examples1.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGMERGE/POUpdate_doc_user_examples2.py b/test/MSGMERGE/POUpdate_doc_user_examples2.py
index 0126391f..a9f7dda1 100644
--- a/test/MSGMERGE/POUpdate_doc_user_examples2.py
+++ b/test/MSGMERGE/POUpdate_doc_user_examples2.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGMERGE/POUpdate_doc_user_examples3.py b/test/MSGMERGE/POUpdate_doc_user_examples3.py
index 31c09c5f..782b4cdc 100644
--- a/test/MSGMERGE/POUpdate_doc_user_examples3.py
+++ b/test/MSGMERGE/POUpdate_doc_user_examples3.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGMERGE/POUpdate_doc_user_examples4.py b/test/MSGMERGE/POUpdate_doc_user_examples4.py
index 51d944f9..71587acb 100644
--- a/test/MSGMERGE/POUpdate_doc_user_examples4.py
+++ b/test/MSGMERGE/POUpdate_doc_user_examples4.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGMERGE/POUpdate_doc_user_examples5.py b/test/MSGMERGE/POUpdate_doc_user_examples5.py
index 07751caf..d92fa4da 100644
--- a/test/MSGMERGE/POUpdate_doc_user_examples5.py
+++ b/test/MSGMERGE/POUpdate_doc_user_examples5.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGMERGE/POUpdate_doc_user_examples6.py b/test/MSGMERGE/POUpdate_doc_user_examples6.py
index bd71acf3..6360db55 100644
--- a/test/MSGMERGE/POUpdate_doc_user_examples6.py
+++ b/test/MSGMERGE/POUpdate_doc_user_examples6.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/MSGMERGE/POUpdate_doc_user_examples8.py b/test/MSGMERGE/POUpdate_doc_user_examples8.py
index e113e2ce..78e478db 100644
--- a/test/MSGMERGE/POUpdate_doc_user_examples8.py
+++ b/test/MSGMERGE/POUpdate_doc_user_examples8.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
# Trivial example. Just load the tool.
test = TestSCons.TestSCons()
diff --git a/test/XGETTEXT/POTUpdate_doc_user_examples1.py b/test/XGETTEXT/POTUpdate_doc_user_examples1.py
index 63bdfdb2..f3e76a8b 100644
--- a/test/XGETTEXT/POTUpdate_doc_user_examples1.py
+++ b/test/XGETTEXT/POTUpdate_doc_user_examples1.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
test = TestSCons.TestSCons()
diff --git a/test/XGETTEXT/POTUpdate_doc_user_examples2.py b/test/XGETTEXT/POTUpdate_doc_user_examples2.py
index 3698d244..72345a65 100644
--- a/test/XGETTEXT/POTUpdate_doc_user_examples2.py
+++ b/test/XGETTEXT/POTUpdate_doc_user_examples2.py
@@ -31,8 +31,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
test = TestSCons.TestSCons()
test.write('SConstruct',
diff --git a/test/XGETTEXT/POTUpdate_doc_user_examples3.py b/test/XGETTEXT/POTUpdate_doc_user_examples3.py
index de9687e4..2c4cf065 100644
--- a/test/XGETTEXT/POTUpdate_doc_user_examples3.py
+++ b/test/XGETTEXT/POTUpdate_doc_user_examples3.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
test = TestSCons.TestSCons()
diff --git a/test/XGETTEXT/POTUpdate_doc_user_examples4.py b/test/XGETTEXT/POTUpdate_doc_user_examples4.py
index 881f65e0..9743c0c7 100644
--- a/test/XGETTEXT/POTUpdate_doc_user_examples4.py
+++ b/test/XGETTEXT/POTUpdate_doc_user_examples4.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
test = TestSCons.TestSCons()
diff --git a/test/XGETTEXT/POTUpdate_doc_user_examples5.py b/test/XGETTEXT/POTUpdate_doc_user_examples5.py
index 4afb3cf9..21aa27ac 100644
--- a/test/XGETTEXT/POTUpdate_doc_user_examples5.py
+++ b/test/XGETTEXT/POTUpdate_doc_user_examples5.py
@@ -32,8 +32,6 @@ Make sure, that the examples given in user guide all work.
import TestSCons
import os
-site_scons = os.environ['SCONS_TOOL_LIB_DIR']
-
###############################################################################
test = TestSCons.TestSCons()
@@ -62,10 +60,7 @@ test.must_not_contain('0/1/po/messages.pot', 'Hello from ../../a.cpp')
test.write('0/1/po/SConstruct',
"""
# SConstruct file in '0/1/po/' subdirectory
-env = Environment(
- toolpath = ['""" + site_scons + """/SConsToolGettext']
-, tools = ['default', 'xgettext']
-)
+env = Environment( tools = ['default', 'xgettext'] )
env.POTUpdate(XGETTEXTFROM = 'POTFILES.in', XGETTEXTPATH=['../../', '../'])
""")
test.run(arguments = 'pot-update', chdir = '0/1/po')