Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py build_ext --inplace not generating .c files #33

Open
rjackson opened this issue Sep 16, 2013 · 2 comments
Open

setup.py build_ext --inplace not generating .c files #33

rjackson opened this issue Sep 16, 2013 · 2 comments

Comments

@rjackson
Copy link
Contributor

On Ubuntu 13.04, Python 2.7


Using python setup.py build_ext --inplace produced the following, noting that the .c file 'cythonize' was meant to produce did not exist:

missing cimport in module 'skadi.io': skadi/io/unpacker/cProp.pyx
missing cimport in module 'skadi.io': skadi/io/unpacker/cEntity.pyx
running build_ext
building 'skadi.io.cBitstream' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c skadi/io/cBitstream.c -o build/temp.linux-x86_64-2.7/skadi/io/cBitstream.o
x86_64-linux-gnu-gcc: error: skadi/io/cBitstream.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 4

After reading into Cython more, I learned I could generate the .c files from the .pyx files myself with cython -a whatever.pyx, so I used the following sequence of commands and everything worked:

cython -a skadi/io/cBitstream.pyx
cython -a skadi/io/unpacker/cProp.pyx
cython -a skadi/io/unpacker/cEntity.pyx
python setup.py build_ext --inplace

This is just a workaround however, setup.py still fails on a fresh repo for me.

@onethirtyfive
Copy link
Member

I think the reason for this is pretty obscure... there's an old alternative to setuptools called... distribute? If you install it, cython works. Let me compare notes with Blue tomorrow.

@lclarkmichalek
Copy link
Contributor

Yeah, this is a problem. I think adding distribute to the dependencies may work (see http://pythonhosted.org/distribute/using.html), though I haven't tested it. It may almost be a case of the user runs setup.py once, it installs distribute and fails, runs it again, and it uses distribute from the get-go, and install succeeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants