C Runtime, Compiler and Build System Generator¶
Build system generator¶
Since scikit-build simply provides glue between setuptools
and CMake, a CMake generator is used to configure the build
system allowing to build of CPython C extensions.
Changed in version 1.0: scikit-build no longer probes for installed Visual Studio versions or runs a language test to discover a working generator. CMake’s own default generator selection applies.
CMake selects its default generator for the current platform, and the
CMAKE_GENERATOR environment variable can be used to override it:
CMAKE_GENERATOR="Unix Makefiles" pip install .
Ninja is the recommended generator. It is automatically parallel and is
available on all platforms. The recommended
scikit_build_core.setuptools.build_meta backend (see
Example of setup.py, CMakeLists.txt and pyproject.toml) adds the ninja python package to the build requirements automatically
when no suitable build tool is already available.
For more details about CMake generators, see the CMake documentation.
Compiler¶
The compiler is selected by CMake following its usual rules; the CC and
CXX environment variables can be used to point at specific compilers.
The compiler toolchain used to build the target CPython interpreter should
be available; refer to the table below for the usual distribution mechanisms
for each operating system.
Linux |
MacOSX |
Windows |
|
|---|---|---|---|
C runtime |
libSystem |
||
Compiler |
Microsoft C/C++ Compiler (cl.exe) |
||
Provenance |
OSX SDK within XCode |