最新消息:

easycython编译py文件为动态链接库

软件开发 王杭州 5493浏览 0评论 [编辑]

自动将一个或多个.pyx文件编译为相应的.pyd|.so二进制模块,避免编写大量的setup.py文件。

具体用法
$python easycython.py myextension.pyx

如果easycython.py在搜索路径内,那么可以直接执行
$easycython.py myextension.pyx
甚至编译当前目录下所有pyx文件。
$easycython.py *.pyx

查看easycython.py的帮助内容
$easycython.py -h
usage: easycython.exe [-h] [--annotation] [--no-annotation] [--numpy-includes]
[--no-numpy-includes] [--debugmode] [--no-debugmode]
[filenames [filenames ...]]

positional arguments:
filenames

optional arguments:
-h, –help show this help message and exit
–annotation
–no-annotation (default: True)
–numpy-includes
–no-numpy-includes (default: True)
–debugmode (default: False)
–no-debugmode

转载请注明:王杭州的个人网页 » easycython编译py文件为动态链接库

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址