Skip to content

Request PYTHON_INCLUDE_DIR and PYTHON_LIBRARY variables (or equivalent) #231

@ramcdona

Description

@ramcdona

CMake's FindPythonLibs.cmake searches standard install locations to find a Python installation to build against when compiling C/C++ to work with Python. This generally means it finds the default system-installed Python.

Since setup-python installs specific requested versions of Python to a non-standard location, CMake won't ever find them.

It would be great if setup-python set variables (like pythonLocation) that point at the library and header files needed to build C/C++ against a specific Python. In CMake terms, these are PYTHON_INCLUDE_DIR and PYTHON_LIBRARY, but other names could be used.

The CMake scripts FindPythonLibs, FindPythonInterp, and the new FindPython2 and FindPython3 set some other variables that might also be worth adding to the list.

Finally, it would be great if all these variables were clearly documented and their existence was obvious to a user of setup-python.

Metadata

Metadata

Assignees

Labels

feature requestNew feature or request to improve the current logic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions