Hi Martin Regarding the multipackage tests you wrote (about the patterns matching dynamic Python library):
> We could simply remove it. Because if bootloader is linked dynamically > and libpython is missing then other test cases would fail. So we do not > need to check it in multipackage tests. Ok, that fixed all the multipackage tests. The other tests that failed were: 1. import/test_zipimport 2. import/test_relative_import 3. basic/test_absolute_ld_library_path 1) import/test_zipimport: The problem was that the package 'pkg_resources' was missing on my AIX installation. Installing setuptools from http://pypi.python.org/pypi/setuptools fixed the problem. However, not import/test_zipimport2 fails which it did not before. Strange. I write more about that below. 2) import/test_relative_import: This test fails on AIX bu also on my Mac like this: #################### EXECUTING TEST import/test_relative_import #################### RUNNING: dist/test_relative_import/test_relative_import.exe Traceback (most recent call last): File "<string>", line 2, in <module> File "../PyInstaller/iu.py", line 424, in importHook File "../PyInstaller/iu.py", line 514, in doimport File "<..snip..>/buildtests/import/build/pyi.darwin/ test_relative_import/outPYZ1.pyz/relimp.B.C", line 3, in <module> File "../PyInstaller/iu.py", line 443, in importHook ImportError: No module named !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! TEST import/ test_relative_import FAILED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! {'failed': ['import/test_relative_import'], 'passed': [], 'skipped': []} My trunk dir is checked out from revision 1585. Does the test run cleanly on your machine? 3) basic/test_absolute_ld_library_path: This test does not really check what it says in the comments: # LD_LIBRARY_PATH set by bootloader should not contain ./ However, the assert simply says: libpath = os.path.normpath(os.path.abspath(os.path.dirname(sys.executable))) libpath += '/'' <..snip..> assert libpath == os.environ.get('LD_LIBRARY_PATH') In my environment LD_LIBRARY_PATH was already set (but not to "./"). This caused the test to fail. Unsetting the LD_LIBRARY_PATH var before running the test made it pass. Any good ideas how to improve the test? Really, the test should simply look for the value of 'libpath' in the LD_LIBRARY_PATH. It cannot assume the var is not set beforehand. Or we should add a comment to the test which says we assume that LD_LIBRARY_PATH is not set before the test runs and explains how to unset it (e.g. from bash "unset LD_LIBRARY_PATH"). What do you think? 4) import/test_zipimport2 Now the test status for trunk on my AIX box is: {'failed': ['import/test_zipimport2', 'import/test_relative_import'], 'passed': ['basic/test_1', 'basic/test_2', 'basic/test_5', 'basic/test_6', 'basic/test_7', 'basic/test_8', 'basic/test_9', 'basic/test_10', 'basic/test_11', 'basic/test_12', 'basic/test_13', 'basic/test_14', 'basic/test_16', 'basic/test_email', 'basic/test_encoders', 'basic/test_f_option', 'basic/test_filename', 'import/test_zipimport', 'basic/test_celementtree', 'basic/test_nestedlaunch0', 'basic/test_nestedlaunch1', 'import/test_relative_import2', 'import/test_relative_import3', 'import/test_error_during_import', 'multipackage/test_multipackage1', 'multipackage/test_multipackage2', 'multipackage/test_multipackage3', 'multipackage/test_multipackage4', 'multipackage/test_multipackage5', 'basic/test_getfilesystemencoding', 'basic/test_absolute_ld_library_path'], 'skipped': ['basic/test_ctypes', 'libraries/test_wx', 'libraries/test_numpy', 'libraries/test_enchant', 'libraries/test_pycrypto', 'import/test_ctypes_cdll_c', 'libraries/test_sqlalchemy', 'import/test_ctypes_cdll_c2']} You can see, now a new test has started failing: import/ test_zipimport2 (As I also wrote above.) The output is: now importing setuptools.dist Traceback (most recent call last): File "<string>", line 42, in <module> File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 424, in importHook mod = _self_doimport(nm, ctx, fqname) File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 514, in doimport exec co in mod.__dict__ File "/tmp/_MEI4Rynaa/eggs/setuptools-0.6c11-py2.6.egg/setuptools/ __init__.py", line 2, in <module> File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 424, in importHook mod = _self_doimport(nm, ctx, fqname) File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 514, in doimport exec co in mod.__dict__ File "/tmp/_MEI4Rynaa/eggs/setuptools-0.6c11-py2.6.egg/setuptools/ extension.py", line 2, in <module> File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 424, in importHook mod = _self_doimport(nm, ctx, fqname) File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 514, in doimport exec co in mod.__dict__ File "/tmp/_MEI4Rynaa/eggs/setuptools-0.6c11-py2.6.egg/setuptools/ dist.py", line 5, in <module> File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 424, in importHook mod = _self_doimport(nm, ctx, fqname) File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 514, in doimport exec co in mod.__dict__ File "/tmp/_MEI4Rynaa/eggs/setuptools-0.6c11-py2.6.egg/setuptools/ command/install.py", line 2, in <module> File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 424, in importHook mod = _self_doimport(nm, ctx, fqname) File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 514, in doimport exec co in mod.__dict__ File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched-mgd/ buildtests/import/build/pyi.aix5/test_zipimport2/outPYZ1.pyz/ distutils.command.install", line 21, in <module> File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 424, in importHook mod = _self_doimport(nm, ctx, fqname) File "<workdir>/pyinstaller-patches/pyinstaller-trunk-patched/ PyInstaller/iu.py", line 514, in doimport exec co in mod.__dict__ File "/tmp/_MEI4Rynaa/eggs/setuptools-0.6c11-py2.6.egg/site.py", line 73, in <module> File "/tmp/_MEI4Rynaa/eggs/setuptools-0.6c11-py2.6.egg/site.py", line 22, in __boot File "/tmp/_MEI4Rynaa/eggs/setuptools-0.6c11-py2.6.egg/site.py", line 73, in <module> File "/tmp/_MEI4Rynaa/eggs/setuptools-0.6c11-py2.6.egg/site.py", line 38, in __boot ImportError: Couldn't find the real 'site' module !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! TEST import/test_zipimport2 FAILED !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! {'failed': ['import/test_zipimport2'], 'passed': [], 'skipped': []} I don't really understand why this test did not fail before. It is also importing the 'pkg_resources' package which I have just installed, as you have read above. Running the test Python code outside PyInstaller works fine: $ python import/test_zipimport2.py <..snip..> ----------- now importing pkg_resources ----------- now importing setuptools.dist ----------- now importing setuptools.command $ Any ideas? /Martin -- You received this message because you are subscribed to the Google Groups "PyInstaller" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.
