pybind / pybind/python_example

Unsupported Wheel on x86_64 Intel Chip Mac running OSX 13.4

未關閉
#160 4 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

使用 CMakeLists.txt 和 setup.py,透過 python3 setup.py bdist_wheel 重現建置,然後檢查 build/bdist.macosx-10.9-x86_64/wheel 輸出,以及 MACOSX_DEPLOYMENT_TARGETARCHFLAGS 設定。將產生的 wheel 標籤與安裝平台進行比較;在指定的 macOS x86_64 環境中成功安裝 wheel 即表示完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
cmake, python
領域
build-system
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
30/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。