On mer, 2008-12-17 at 09:41 -0800, Vicent wrote:
> I forgot to mention that I'm using the svn trunk PyInstaller and
> Windows XP.
> 
> On Dec 17, 4:45 pm, Vicent <[email protected]> wrote:
> > Hi,
> >
> > I'm newbie to PyInstaller... and I've problems. I've the following
> > simple script, prova.py:
> >
> > #!/usr/bin/env python
> > import tables
> >
> > print 'Hello'
> >
> > and the following spec file, prova.spec:
> >
> > # -*- mode: python -*-
> > a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'),
> > os.path.join(HOMEPATH,'support\\useUnicode.py'), 'prova.py'],
> >              pathex=['C:\\Documents and Settings\\vmas\\Mis
> > documentos'])
> > pyz = PYZ(a.pure)
> > exe = EXE(pyz,
> >           a.scripts + [('v', '', 'OPTION')],
> >           exclude_binaries=0,
> >           name='build\\pyi.win32\\prova\\prova.exe',
> >           debug=True,
> >           strip=False,
> >           upx=True,
> >           console=True)
> > coll = COLLECT( exe,
> >                a.binaries,
> >                a.zipfiles,
> >                strip=False,
> >                upx=True,
> >                name=os.path.join('dist', 'prova'))
> >
> > After building prova.spec I run the generated prova.exec. I get the
> > following error:
> >
> > ...
> >
> > import tables._comp_lzo # dynamically loaded from C:\Documents and
> > Settings\vmas
> > \Mis documentos\dist\prova\tables._comp_lzo.pyd
> > Traceback (most recent call last):
> >   File "<string>", line 3, in <module>
> >   File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > \iu.py", line 4
> > 14, in importHook
> >     mod = _self_doimport(nm, ctx, fqname)
> >   File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > \iu.py", line 4
> > 99, in doimport
> >     exec co in mod.__dict__
> >   File "C:\Documents and Settings\vmas\Mis documentos\build
> > \pyi.win32\prova\outP
> > YZ1.pyz/tables", line 56, in <module>
> >   File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > \iu.py", line 4
> > 14, in importHook
> >     mod = _self_doimport(nm, ctx, fqname)
> >   File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > \iu.py", line 4
> > 73, in doimport
> >     mod = importfunc(nm)
> >   File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > \iu.py", line 2
> > 82, in getmod
> >     mod = owner.getmod(nm)
> >   File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > \archive.py", l
> > ine 418, in getmod
> >     return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
> >   File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > \iu.py", line 1
> > 09, in getmod
> >     mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
> >   File "utilsExtension.pyx", line 100, in tables.utilsExtension
> > AttributeError: 'module' object has no attribute '_comp_lzo'
> > RC: -1 from prova
> > OK.
> >
> > I've tried adding a hook, hook-tables.py:
> >
> > hiddenimports = ['_comp_lzo']
> >
> ---------~----~----~----~------~----~------~--~---
> 

I gave a look. It looks like it should be sufficient to add:

hiddenimports = ['tables._comp_lzo', 'tables._comp_bzip2']

These are the hidden imports (that comes from utilsExtension.pyx). Let
me know if it works for you.
-- 
Giovanni Bajo
Develer S.r.l.
http://www.develer.com



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to