cython py2exe python 打包

1、准备好你的源文件。

2、setup.py

from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize("xxx.py")
)

3、

setup.py build_ext --inplace

4、删除需要删除的py源文件

5、mysetup.py

from distutils.core import setup
import py2exe
setup(console=["xxx.py"], options={"py2exe":{"includes":["xxxx"]}})

6、

mysetup.py py2exe

7、dist目录为目标文件

发表评论

邮箱地址不会被公开。 必填项已用*标注

*

code