为了实验的准确性,在全过程使用的python环境版本都为同一版本
easycython和cython编译为pyd文件的不同在于,easycython编译的原始文件后缀为pyx,cython编译的原始文件为py
def ZWHCythonTest():
print("Z_W_H_")
def ZWHCythonTest1():
print("cython测试")
pip install cython
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# here put the import lib
from distutils.core import setup
from Cython.Build import cythonize
setup(ext_modules=cythonize(["ZWHcython.py"]))
python setup.py build_ext --inplace