I'm getting the following error with the latest Cython compiled from Git while importing a module from outside the tree hierachy (by using the -I parameter)
cython --embed --cplus --include-dir /home/gabo/ignifuga/.. /home/gabo/bunnies/build/linux64/bunniesx.pyx
Traceback (most recent call last):
File "/usr/local/bin/cython", line 8, in <module>
main(command_line = 1)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 616, in main
result = compile(sources, options)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 591, in compile
return compile_multiple(source, options)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 563, in compile_multiple
result = run_pipeline(source, options)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 426, in run_pipeline
err, enddata = Pipeline.run_pipeline(pipeline, source)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Pipeline.py", line 315, in run_pipeline
data = phase(data)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Pipeline.py", line 31, in parse
check_module_name = not Options.embed)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 168, in find_module
err, result = self.process_pxd(source_desc, scope, module_name)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Main.py", line 100, in process_pxd
result = Pipeline.run_pipeline(pipeline, source_desc)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Pipeline.py", line 315, in run_pipeline
data = phase(data)
File "Visitor.py", line 276, in Cython.Compiler.Visitor.CythonTransform.__call__ (/home/gabo/mdqinc/cython/Cython/Compiler/Visitor.c:5567)
File "Visitor.py", line 259, in Cython.Compiler.Visitor.VisitorTransform.__call__ (/home/gabo/mdqinc/cython/Cython/Compiler/Visitor.c:5295)
File "Visitor.py", line 165, in Cython.Compiler.Visitor.TreeVisitor._visit (/home/gabo/mdqinc/cython/Cython/Compiler/Visitor.c:3678)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/ParseTreeTransforms.py", line 1801, in visit_ModuleNode
node.body.analyse_expressions(node.scope)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Nodes.py", line 343, in analyse_expressions
stat.analyse_expressions(env)
File "/usr/local/lib/python2.7/dist-packages/Cython/Compiler/Nodes.py", line 6517, in analyse_expressions
env.use_utility_code(ExprNodes.type_test_utility_code)
AttributeError: 'module' object has no attribute 'type_test_utility_code'
In bunnies.pyx I'm doing...
from ignifuga.backends.sdl.Renderer cimport Renderer, Sprite_p
and this error actually happens if add:
cdef Renderer renderer
In the "global" part of the file (ie, not inside a function or class)
Real bug or am I doing something I'm not supposed to?
--
Gabriel.