python 文件编译案例

对pyx文件进行编译

使用setup_lib.py

 ----------------------------------------

from distutils.core import setup

from distutils.extension import Extersion

from Cython.Distutils import build_ext

import numpy

 

ext-modules = [ Extension("Ablib",["Ablib.pyx"], include_dirs=[numpy.get_include()] ) ]

 

setup(

name = 'ablib'

cmdclass={ 'build_ext':build_ext}

ext_modules  = ext_modules , requires=['apscheduler']

)

 

 

 

------------------------------------------ 

python setup_litb.py  build_ext --inplace

 

posted @ 2023-04-04 22:42  oceaning  阅读(34)  评论(0编辑  收藏  举报