pybind / pybind/python_example
Unsupported Wheel on x86_64 Intel Chip Mac running OSX 13.4
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 530
- 派生
- 150
- 平均合并
- 8 天 2 小时
- 30 天内合并 PR
- 1
描述
I have a working CMakeLists.txt file which generates both an executable (racplusplus_exe) and a static library (racplusplus.cpython-311-darwin.so) wrapped with pybind. The executable runs perfectly, and I can import the static library in python and run functions successfully.
When I use setup.py to python3 setup.py bdist_wheel I get a wheel built in dist/racplusplus-0.9-cp311-cp311-macosx_13_0_x86_64.whl. But whenever I try to pip install the wheel I get the error "ERROR: racplusplus-0.9-cp311-cp311-macosx_13_0_x86_64.whl is not a supported wheel on this platform."
During the build output I see multiple lines with mention macosx 10.9 for some reason. ie: "installing to build/bdist.macosx-10.9-x86_64/wheel". So I wonder if somehow the wheel is being built for the wrong macOSX, even though the final wheel name has the correct OS?
I have tried manually setting
python os.environ["ARCHFLAGS"] = "-arch x86_64 -mmacosx-version-min=13.0"
and also manually setting
python os.environ['MACOSX_DEPLOYMENT_TARGET'] = '13.0'
in "setup.py", but neither of these environment variables seems to be respected.
Any ideas what's going on? Not sure this is inherently an issue with setup.py for newer OS's or if I'm not understanding how to specify the wheel architecture correctly.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用 CMakeLists.txt 和 setup.py,通过 python3 setup.py bdist_wheel 重现构建,然后检查 build/bdist.macosx-10.9-x86_64/wheel 输出以及 MACOSX_DEPLOYMENT_TARGET 和 ARCHFLAGS 设置。将生成的 wheel 标签与安装平台进行比较;在所述 macOS x86_64 环境中成功安装 wheel 即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- cmake, python
- 领域
- build-system
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100