Note that there are some explanatory texts on larger screens.

plurals
  1. POpy2app import breaks cython
    primarykey
    data
    text
    <p>I'm using the basic "hello world" demo straight out of the Cython documentation. It works fine unless I try to import py2app in the same setup.py file:</p> <pre><code>import py2app from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext setup( cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("helloworld", ["helloworld.pyx"])] ) </code></pre> <p>Py2app itself works fine as long as I pre-generate the <code>.c</code> files for my Cython modules. But if I haven't, then <code>build_ext</code> fails with:</p> <pre><code>running build_ext gcc-4.2 not found, using clang instead building 'helloworld' extension clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c helloworld.c -o build/temp.macosx-10.6-intel-2.7/helloworld.o clang: error: no such file or directory: 'helloworld.c' clang: error: no input files error: command 'clang' failed with exit status 1 </code></pre> <p><b>If I comment out <code>import py2app</code> in setup.py, <code>build_ext</code> works fine</b> and I get the missing intermediate step in my compilation:</p> <pre><code>... gcc-4.2 not found, using clang instead cythoning helloworld/helloworld.pyx to helloworld/helloworld.c building 'helloworld' extension ... </code></pre> <p>So what is it about py2app that breaks Cython? And what can I do about it? I'd like to have just one setup.py for my project, obviously.</p> <p>I have Cython 0.18 and py2app 0.7.2, installed from PyPI. I'm using Mac OS X 10.8 with the python.org Python 2.7.3, not Apple's build.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload