|
From: Thomas H. <th...@py...> - 2005-10-13 17:43:45
|
"Russell E. Owen" <ro...@ce...> writes:
> In article <434...@st...>,
> Todd Miller <jm...@st...> wrote:
>
>> Russell E. Owen wrote:
>>
>> >If I convert my python code to an application (Windows via py2exe or Mac
>> >via bundlebuilder) it fails with the following error:
>> >
>> >Fatal Python error: Call to API function without first calling
>> >import_libnumarray() in Src/_convmodule.c
>>...
>> >I can force *all* of numarray into the application, which avoids the
>>...
>> Unfortunately, I think it's just necessary to (a) include all of core
>> numarray and (b) help out automated tools (which choke on circular
>> dependencies) by explicitly listing numarray's core extensions.
>
> Is there some practical way to include all of core numarray (without
> getting the unused extensions)?
>
> Could "import numarray" itself do the importing of core numarray? Then
> automatic packaging tools would "just work".
The easiest way to build some 'hints' for those packaging tools that use
modulefinder is to create a silly function that imports everything
belonging to the package:
def _give_py2exe_hints():
import this
import that
...
Note that it will NOT work to write this:
if 0:
import this
import that
...
because 'if 0' blocks are optimized away completely by the Python
compiler.
This should be in numarray's __init__.py file, probably.
Thomas
|