[BUG] cmake detects wrong PYTHON_LIBRARIES even if PYTHON_EXECUTABLE is set
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Issue description
When building on a system with multiple python installations, pybind11's cmake script set PYTHON_LIBRARIES to the wrong values.
I was suggested in the gitter chat to set PYTHON_EXECUTABLE.
With that it shows the right interpreter, but the libraries are still pulled from the wrong path.
Reproducible example code
It happened to me when trying to link to the MSYS2 python in an Appveyor job, but I've head people had the same issue in other systems as well.
Contributor guide
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
Start by reproducing the issue with multiple Python installations, including the MSYS2/Appveyor setup described in the report, and inspect pybind11's CMake Python discovery. Done means PYTHON_LIBRARIES resolves to the libraries belonging to the interpreter selected by PYTHON_EXECUTABLE across the affected systems.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100