2009-11-27

cython编译python代码为单个可执行文件

 
 

Sent to you by l5g via Google Reader:

 
 

via Zhiwei.Li by zhiwei on 10/29/09

下面是使用cython --embed参数来实现,类似于pyrex中的方法
http://hg.cython.org/cython/file/tip/Demos/embed
包括
http://hg.cython.org/cython/raw-file/55e5ddc03e3b/Demos/embed/main.c
http://hg.cython.org/cython/raw-file/55e5ddc03e3b/Demos/embed/embedded.pyx
http://hg.cython.org/cython/raw-file/55e5ddc03e3b/Demos/embed/Makefile.unix
http://hg.cython.org/cython/raw-file/55e5ddc03e3b/Demos/embed/Makefile
http://hg.cython.org/cython/raw-file/55e5ddc03e3b/Demos/embed/Makefile.msc
http://hg.cython.org/cython/raw-file/55e5ddc03e3b/Demos/embed/Makefile.msc.static
打包下载
http://hg.cython.org/cython/archive/55e5ddc03e3b.tar.bz2

第2种方法就是
http://github.com/MarkLodato/cython_freeze


 
 

Things you can do from here:

 
 

No comments:

Post a Comment