On Sep 10, 2008, at 2:32 PM, Lisandro Dalcin wrote: > On Wed, Sep 10, 2008 at 6:14 PM, Jay Parlar <[EMAIL PROTECTED]> wrote: >> Does anyone have any tips on getting py2exe to know that a Cython >> module is doing a cimport of another Cython module? > > Well, I cannot imagine a direct way. However, you can hack things. Try > to add a '_deps.py' file in your package, and put there all the > required imports for Cython-generated extension modules. > > Note that I've never used py2exe, but regarding the way (I believe) it > works, perhaps the suggested hackery will hopefully solve your > problems.
I've never used py2exe either, but if you do get it to work could you please put the info up on http://wiki.cython.org? > >> >> In the top level of my directory, I have a file PC_viewer.py, and a >> Cython module reader.pyx. reader.pyx does the following cimport: >> >> from filters.dc cimport DC >> >> >> So there's a 'filters' directory, in there I have a 'dc' module, >> which >> has a DC class. >> >> Everything works fantastically when just running with straight >> Python, >> but the executables created by py2exe don't seem very happy. >> >> $ ./PC_viewer.exe >> Traceback (most recent call last): >> File "PC_viewer.py", line 14, in <module> >> File "reader.pyc", line 12, in <module> >> File "reader.pyc", line 10, in __load >> File "dc.pxd", line 1, in reader (reader.c:8732) >> ImportError: No module named dc >> >> Any thoughts or tips? The 'dc' module doesn't show up in the >> library.zip created by py2exe. >> >> >> >> Jay P. >> _______________________________________________ >> Cython-dev mailing list >> [email protected] >> http://codespeak.net/mailman/listinfo/cython-dev >> > > > > -- > Lisandro Dalcín > --------------- > Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) > Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) > Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) > PTLC - Güemes 3450, (3000) Santa Fe, Argentina > Tel/Fax: +54-(0)342-451.1594 > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
