[Pyrex] New Distutils implementation for Pyrex.

Phillip J. Eby pje at telecommunity.com
Mon Aug 6 00:37:28 CEST 2007


At 11:41 PM 8/3/2007 -0400, Billy G. Allie wrote:
>The files that would have to change are:
>command/upload.py
>command/easy_install.py
>dist.py
>extension.py
>__init__.py
>package_index.py
>tests/__init__.py

No need to change all this; setuptools already works correctly with 
Pyrex.Distutils.  If you want it to work with a different extension 
type all you need is a different build_ext command, and for that you 
don't need to patch anything.  Just have your setup script specify 
your build_ext class using setup(... 
cmdclass=dict(build_ext=my_buildext_class), ...).

That's really all you need; no patching is required.

Indeed, the only reason that setuptools does anything with Pyrex at 
all is to support *not* compiling .pyx files when Pyrex is *not* 
installed.  If there are .pyx sources for an Extension and 
Pyrex.Distutils can't be imported, setuptools changes the source file 
extensions to '.c' so that a distributed pre-built .c file can be 
compiled without needing Pyrex.




More information about the Pyrex mailing list