Hi,

I've setup a very simple testcase, where a main module imports  a 
package and calls a simple function from one module (using latest 
Cython-0.11.3 on python 2.6):

main.py
        import pack
        pack.m1.doesomething()
pack/__init__.py
        import m1
pack/m1.py
        def dosomething()
           print 'hello'

$:~/tmp/cythontest> cython -r main.py
Traceback (most recent call last):
   File "/usr/local/bin/cython", line 8, in <module>
     main(command_line = 1)
   File 
"/usr/local/lib/python2.6/site-packages/Cython/Compiler/Main.py", line 
740, in main
     result = compile(sources, options)
   File 
"/usr/local/lib/python2.6/site-packages/Cython/Compiler/Main.py", line 
717, in compile
     return compile_multiple(source, options)
   File 
"/usr/local/lib/python2.6/site-packages/Cython/Compiler/Main.py", line 
683, in compile_multiple
     if not timestamps or context.c_file_out_of_date(source):
NameError: global name 'context' is not defined


Any idea what's wrong? What I would like to achieve is to compile all 
(possible) modules from a package into my main module.

Any help would be very appreciated.

Cheers,

Ralph
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to