最近一个自定义的python扩展在由wheel构建为二进制文件后开始出现此错误 - python setup.py bdist_wheel
似乎ABI标签现在已添加到新版本的滚轮中,请参阅.27 版本细节。
快速测试证明这是问题;首先注意ABI标记cp27m,并在文件名中将其更改为无
alex-VirtualBox tmp # pip install xxxxx-1.0.1+ddd-cp27-cp27m-linux_x86_64.whl
xxxxx-1.0.1%2Bddd-cp27-cp27m-linux_x86_64.whl is not a supported wheel on this platform.
Storing debug log for failure in /root/.pip/pip.log
alex-VirtualBox tmp # pip install xxxxx-1.0.1+ddd-cp27-none-linux_x86_64.whl
Unpacking ./xxxxx-1.0.1+ddd-cp27-none-linux_x86_64.whl
Installing collected packages: xxxxx
Successfully installed xxxxx
Cleaning up...
如何使disutils在Python 2.7中将ABI标记设置为None
答案 0 :(得分:0)
一种方法似乎是在setup.py
中设置ABI标记from setuptools import setup, find_packages, Extension
from os import path
C_EXT_SOURCE_DIR = "c-module/src/"
SOURCE_FILES = ["module_v1.c", "x2.c"]
xy_extension = Extension("module_v1",
sources=[C_EXT_SOURCE_DIR + path for path in SOURCE_FILES],abi="none")
setup(name='xxx',
packages=find_packages(exclude=["test"]),
version="1.0.1",
description='xxx',
author='xxx',
ext_modules=[xy_extension],
include_package_data=True
)
但我不确定这是否是正确的方法,尽管部分提到https://www.python.org/dev/peps/pep-3149/
答案 1 :(得分:0)