On 17 May 2010 16:39, Giovanni Bajo <[email protected]> wrote: > On 5/17/2010 3:05 PM, Jussi Rasinmäki wrote: >> >> Sorry, I had disabled the tables hooks for an alternative build. >> This is what I get when enabling the hiddenimports again: [...] > > Thanks. > > I have found out what it is going on. Normally, Python converts this > statement: > > import tables._comp_lzo > > into something like: > > globals()["tables"] = > __import__("tables._comp_lzo", > globals(), > locals(), > None) > > The last "None" argument is the "fromlist", that is a list of strings that > is populated in case of from-import (such as "from foobar import a,b,c"). > > The bug here was triggered by Pyrex, that compiles the import statement into > a call to __import__ with an empy from-list instead of None: > > > static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) { > PyObject *__import__ = 0; > PyObject *empty_list = 0; > PyObject *module = 0; > PyObject *global_dict = 0; > PyObject *empty_dict = 0; > PyObject *list; > __import__ = PyObject_GetAttrString(__pyx_b, "__import__"); > if (!__import__) > goto bad; > if (from_list) > list = from_list; > else { > empty_list = PyList_New(0); > if (!empty_list) > goto bad; > list = empty_list; > } > [...] > > > > So, the fix is to modify iu.py so to treat an empty from-list just like > None. I have committed this fix in [833]. > > I have also added the import hook for PyTables in [834]. > > Please, confirm that now PyInstaller works correctly for your application. > Thanks!
It does indeed. Thank you very much, that truly made my day! > -- > 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. > > -- 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.
