[Pyrex] simple script for compiling

Stefan Behnel stefan_ml at behnel.de
Thu May 10 19:25:53 UTC 2007



Brian Blais wrote:
> Can someone tell me if there is something like this already written?  I am planning a 
> seminar on using Python as a Matlab replacement, and part of it uses Pyrex as a 
> replacement for the cmex.  Windows users are not generally too keen on commandlines, 
> especially DOS commandlines, so I wrote a little script to handle the writing of a 
> basic setup.py, and calling the python -setup command.  That way, from the python 
> shell one can do:
> 
> from pyrex_compile import *
> compile('myfile.pyx')
> 
> 
> It is still very rough, but is there something out there already for this?


Why not teach them distutils in the same step? You can provide them with an
example setup.py script, have them fill in the right meta data and then just run

python setup.py bdist_msi

to build a Windows installer or something.

http://docs.python.org/lib/module-distutils.html
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/mpj17-pyrex-guide/2-compiling.html

Stefan



More information about the Pyrex mailing list