from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules = [Extension('messages', ['messages.pyx']),
Extension('signals', ['signals.pyx']),
Extension('dispatchers', ['dispatchers.pyx'])]
setup(cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules)
new-host:c_event_sys chris$ rm -rf build *.c *.so
new-host:c_event_sys chris$ python setup.py build_ext -i
running build_ext
cythoning messages.pyx to messages.c
building 'messages' extension
creating build
creating build/temp.macosx-10.5-i386-2.7
gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -O3 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/Library/Frameworks/Python.framework/Versions/7.0/include -I/Library/Frameworks/Python.framework/Versions/7.0/include/python2.7 -c messages.c -o build/temp.macosx-10.5-i386-2.7/messages.o
gcc -g -L/usr/local/lib -L/Library/Frameworks/Python.framework/Versions/7.0/lib -bundle -undefined dynamic_lookup -g -L/usr/local/lib -L/Library/Frameworks/Python.framework/Versions/7.0/lib -arch i386 build/temp.macosx-10.5-i386-2.7/messages.o -o /Users/chris/Development/traits4/c_event_sys/messages.so
ld: warning: directory '/usr/local/lib' following -L not found
ld: warning: directory '/usr/local/lib' following -L not found
cythoning signals.pyx to signals.c
Error compiling Cython file:
------------------------------------------------------------
...
# pxd imports
from cpython.weakref cimport PyWeakref_NewRef, PyWeakref_GET_OBJECT
from messages cimport Message
^
------------------------------------------------------------
signals.pyx:3:0: 'messages.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
# pxd imports
from cpython.weakref cimport PyWeakref_NewRef, PyWeakref_GET_OBJECT
from messages cimport Message
^
------------------------------------------------------------
signals.pyx:3:0: 'Message.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
# pxd imports
from cpython.weakref cimport PyWeakref_NewRef, PyWeakref_GET_OBJECT
from messages cimport Message
^
------------------------------------------------------------
signals.pyx:3:22: Name 'Message' not declared in module 'messages'
Error compiling Cython file:
------------------------------------------------------------
...
remove_indices.reverse()
for i in remove_indices:
heap.pop(i)
cpdef emit(self, Message message):
^
------------------------------------------------------------
signals.pyx:41:21: 'Message' is not a type identifier
building 'signals' extension
gcc -fno-strict-aliasing -fno-common -dynamic -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -DNDEBUG -g -O3 -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/Library/Frameworks/Python.framework/Versions/7.0/include -I/Library/Frameworks/Python.framework/Versions/7.0/include/python2.7 -c signals.c -o build/temp.macosx-10.5-i386-2.7/signals.o
signals.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation.
error: command 'gcc' failed with exit status 1
new-host:c_event_sys chris$ ls
__init__.py messages.c setup.py test.py
build messages.pxd signals.c
dispatchers.pxd messages.pyx signals.pxd
dispatchers.pyx messages.so signals.pyx
new-host:c_event_sys chris$