6 Aug 03:44
Re: [Pyrex] New Distutils implementation for Pyrex.
Phillip J. Eby wrote: > 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. > If you want to give new options to extension you need to subclass entension.py. If you want to have those new options available as command line options (to setup.py), you need to wrap core.py (it can't be(Continue reading)
RSS Feed