pybind / pybind/python_example
Unsupported Wheel on x86_64 Intel Chip Mac running OSX 13.4
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 530
- Forks
- 150
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the build with CMakeLists.txt and setup.py using python3 setup.py bdist_wheel, then inspect the build/bdist.macosx-10.9-x86_64/wheel output and the MACOSX_DEPLOYMENT_TARGET and ARCHFLAGS settings. Compare the generated wheel tag with the installation platform; done means the wheel installs successfully on the stated macOS x86_64 environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100