在Windows下加密后生成pyd文件
1.下载gcc 下载visual c++ 2015
2.pip install cython
3.在py文件的同一目录下建一个setup.py文件,代码如下
import setuptools
from distutils.core import setup
from Cython.Build import cythonize
import os, shutil
filepathapp = "D:\\python-work\\python_blockchain_app-master\\python_blockchain_app-master\\app\\"
files_1 = os.listdir(filepathapp)
for i in files_1:
if i.endswith(".py") and i != "setup.py" and i != "__init__":
j = i.split('.', 1)
name = j[0]
dirPath = i
filePath3 = "build/"
setup(ext_modules = cythonize([dirPath]))
p