Python 3.9
Setuptools 58.1.0
我有一个 .so 文件,它是我通过 cython 从 .pyx 文件构建的,我想将它包含到我的包中
.so的位置如下
util/helper/foo.so
所以我写了这个脚本,它将显式调用 setuptools setup(而不是 setup.py 方式)
from setuptools import setup, Extension
kwargs = {"name": "foo",
"author": "",
"version": "1.0",
"ext_modules": Extension(name='util/helper/foo', sources=[]),}
setup(**kwargs)
在我遇到这个问题之前,它会很好地构建鸡蛋
running build_ext
error: [Errno 2] No such file or directory: 'util/helper/foo.cpython-39-x86_64-linux-gnu.so'
为什么它在寻找
util/helper/foo.cpython-39-x86_64-linux-gnu.so
而不是util/helper/foo.so
我怎么能强迫
setup()
看for util/helper/foo.so
呢?