pybind / pybind/python_example

Unsupported Wheel on x86_64 Intel Chip Mac running OSX 13.4

オープン
#160 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
530
フォーク
150
平均マージ
8日 2時間
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。