有没有办法使用distutils从cython w / o更改共享库输出的名称?

时间:2014-11-17 09:46:27

标签: python cython

Cython代码可以编译为

cython hello.pyx -o hello.c
gcc -shared -fPIC hello.c -o hello.so `pkg-config python --libs --cflags`

但是如果你将hello.so更改为hello2.so,由于假设函数inithello2将存在于python模块hello2.so中,模块将无法在python中导入。使用distutils,您可以使用关键字更改名称(name =' hello2',...)。但我需要在不使用distutils的情况下获得此功能。可以吗?

0 个答案:

没有答案