I’m trying to build a Python package (pyregion) that contains a *.pyx file and error comes during the build process. Checking out the below output:
$ python setup.py build
running build
running build_py
creating build
creating build/lib.macosx-10.5-x86_64-2.7
....
running build_ext
building 'pyregion._region_filter' extension
C compiler: gcc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -DNDEBUG -g -O3 -arch x86_64
error: unknown file type '.pyx' (from 'src/_region_filter.pyx')
Any ideas on what the issue could be? Just to note, I’m using the Enthought build of Python (7.1) on OSX with the latest Xcode (4.1).
Cheers
The
.pyxshould should be compiled to C with Pyrex and then compiled to object code. Check if asrc/_region_filter.cfile is present in the distribution and hack thesetup.pyscript to build that instead. (Also, consider filing a bug report, since this shouldn’t be happening.)