pybind / pybind/python_example

Unsupported Wheel on x86_64 Intel Chip Mac running OSX 13.4

Offen
#160 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
530
Forks
150
Ø Merge
8 T. 2 Std.
Gemergte PRs (30 T.)
1

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Den Build mit CMakeLists.txt und setup.py mithilfe von python3 setup.py bdist_wheel reproduzieren, anschließend die Ausgabe build/bdist.macosx-10.9-x86_64/wheel sowie die Einstellungen von MACOSX_DEPLOYMENT_TARGET und ARCHFLAGS prüfen. Das generierte Wheel-Tag mit der Installationsplattform vergleichen; abgeschlossen ist die Aufgabe, wenn das Wheel erfolgreich in der angegebenen macOS-x86_64-Umgebung installiert wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cmake, python
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.