<div dir="ltr">The attached patch does not work for two reasons. One, very boring, is that there is more code that sets PYTHONPATH in translate/storage/test_mo.py. The other reason, sadly, is that even once that's gone the tests still fail like this:<div><div><br></div><div>_____________________________________________________________________________________________ test_po_to_xliff _____________________________________________________________________________________________</div><div>    @pytest.mark.skipif('TTKIT_SKIP_COMMANDS' in os.environ,<br></div><div>                        reason='Skip testing command line tools')</div><div>    def test_po_to_xliff():</div><div>        OUTPUT = 'af-pootle.xlf'</div><div>>       assert call(['po2xliff', 'af-pootle.po', OUTPUT]) == 0</div><div>E       assert 1 == 0</div><div>E        +  where 1 = call(['po2xliff', 'af-pootle.po', 'af-pootle.xlf'])</div><div><br></div><div>test_xliff_conformance.py:64: AssertionError</div><div>------------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------------</div><div>Traceback (most recent call last):</div><div>  File "/build/translate-toolkit-ZSDMoF/translate-toolkit-2.0.0/debian/python3-translate/usr/bin/po2xliff", line 6, in <module></div><div>    from pkg_resources import load_entry_point</div><div>  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3037, in <module></div><div>    @_call_aside</div><div>  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3021, in _call_aside</div><div>    f(*args, **kwargs)</div><div>  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3050, in _initialize_master_working_set</div><div>    working_set = WorkingSet._build_master()</div><div>  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 655, in _build_master</div><div>    ws.require(__requires__)</div><div>  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 969, in require</div><div>    needed = self.resolve(parse_requirements(requirements))</div><div>  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 855, in resolve</div><div>    raise DistributionNotFound(req, requirers)</div><div>pkg_resources.DistributionNotFound: The 'translate-toolkit==2.0.0' distribution was not found and is required by the application</div><br></div><div>This is not so surprising when you think about it, translate-toolkit for the default version of Python 3 is not in any sense installed so how could pkg_resources find it?</div><div><br></div><div>Short of going in to bat with upstream for PYTHON35PATH, PYTHON36PATH environment variables I don't think there's much that can be done. There is already a debian patch to add an environment variable to allow skipping the CLI tools (TTKIT_SKIP_COMMANDS), I guess it should be set when testing non-default versions of Python 3?</div><div><br></div><div>Cheers,</div><div>mwh</div></div>