我能够使用PySide2/6、shiboken2/6、scikit-BuildandRepair轮(https://github.com/aymara/lima-python/)生成https://github.com/aymara/lima-python/车轮,但我无法找到在哪里构建与abi3兼容的二进制文件。
我在Guido van Rossum的“Python/C API,Release3.10.5”中读到:
Py_LIMITED_API
Define this macro before including Python.h to opt in to only use the Limited API, and to select the Limited API version.但在shiboken2/6装订中,我不包括Python.h本人。所以我不知道该把这个定义放在哪里。
我在某个地方读到,在构建我自己的shiboken之前,应该定义cmake变量FORCE_LIMITED_API。但这不是一个适当的文档,因此我不确定它是否是正确的解决方案。
发布于 2022-07-27 14:05:43
我想我终于找到了答案。在github.com/qtproject/pyside-pyside-setup上有
For development purposes the following options might be of use,
when using setup.py build: --limited-api=yes|no, default yes if applicable.
Set or clear the limited API flag. Ignored for Python 2. 因此,我可以在构建pyside时传递--limited-api=yes,或者假设使用预构建的-abi3设置了它,然后强制车轮名包含-abi3字符串。
https://stackoverflow.com/questions/73111793
复制相似问题