summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptomulik <ptomulik@meil.pw.edu.pl>2012-06-06 20:39:50 (GMT)
committerptomulik <ptomulik@meil.pw.edu.pl>2012-06-06 20:39:50 (GMT)
commit9609517e3478139d5c503ce96f39eb856f1f78a7 (patch)
tree66ea8b3fef4018bad0863cd7c5a1e4299c57839b
parent8ad30d47a35e1a4bd17b2ff4db49ae1d8a484368 (diff)
downloadSCons-9609517e3478139d5c503ce96f39eb856f1f78a7.zip
SCons-9609517e3478139d5c503ce96f39eb856f1f78a7.tar.gz
SCons-9609517e3478139d5c503ce96f39eb856f1f78a7.tar.bz2
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 d786015..66ab57c 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 1055087..8dfdecf 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 db76cc9..2c6f1ae 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 ce8cff8..f5cdb8f 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 946f18b..96a6c2c 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 51464d4..7fffb86 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 6a93b5e..d099523 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 3d05a21..bf210a1 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 71b5996..d1b7982 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 ad67b3e..ab37369 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 e7cc0ff..3eae629 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 8737b2b..6be4707 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 9082a11..b69e58f 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 a96d921..5832d67 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 f21f874..3f971c9 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 2bcb68e..903a2ac 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 c3971e7..bd38950 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 bf694fa..9e5f189 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 d925568..dd7b41a 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 0126391..a9f7dda 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 31c09c5..782b4cd 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 51d944f..71587ac 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 07751ca..d92fa4d 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 bd71acf..6360db5 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 e113e2c..78e478d 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 63bdfdb..f3e76a8 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 3698d24..72345a6 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 de9687e..2c4cf06 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 881f65e..9743c0c 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 4afb3cf..21aa27a 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')