python setup.py build_ext --inplace
build_ext是指明python生成C/C++的扩展模块(build C/C++ extensions (compile/link to build directory))
--inplace指示 将编译后的扩展模块直接放在与test.py同级的目录中。
可以同时编译多个文件,编译后都到根目录下了。
setup.py
from setuptools import setup
from Cython.Build import cythonize
#python setup.py build_ext --inplace
setup(
name='card_bidui',
ext_modules=cythonize([r'card.py',r'data.py',r'arcface/aaa.py']),
)
python setup.py build_ext --inplace
编写setup.py文件,获取帮助:python setup.py --help-commands
[python]
Standard commands