一、创建一个要打包的py文件
test.py 代码如下:
name = 'test'
def test():
print('hello world!')
二、新建一个用来打包的py文件
packer.py 代码如下:
import distutils.core
from Cython.Build import cythonize
file = cythonize("name.py")[0]
distutils.core.setup(
name='name',
version="1.0",
ext_modules=[file],
author="云霄it",
)