Improved build system generator for Python C/C++/Fortran/Cython extensions
Project description
scikit-build is a Python build system for CPython C/C++/Fortran/Cython extensions using CMake.
The scikit-build package is fundamentally just glue between the setuptools Python module and CMake.
The next generation of scikit-build, scikit-build-core, is currently under development. This provides a simple, reliable build backend for CMake that does not use setuptools and provides a lot of new features. Scikit-build-core can also power a setuptools-based extension system, which will eventually become the backend for scikit-build (classic). If you do not require extensive customization of the build process, you should consider trying scikit-build-core instead of scikit-build.
To get started, see this example. For more examples, see scikit-build-sample-projects.
Scikit-build 0.18.0
This release bumps the minimum required CMake to 3.5 and supports CPython 3.13.
Bug fixes
Support MSVC 17.10 in #1081
CMake 3.5+ requirement in #1095
Support CPython 3.13 with windows lib finding fix in #1094
Don’t die on PermissionError during chmod by @mweinelt in #1073
Remove usage of deprecated distutils in cmake files by @hmaarrfk in #1032
Use first available option for vswhere output by @ZzEeKkAa in #1030
Testing
Support setuptools 69.3.0 changes in two tests by @s-t-e-v-e-n-k in #1087
Use uv in a few places in #1092
Fedora CI
Miscellaneous
Clean up pylint in #1017
Fix mypy type ignores for new setuptools types in #1082
Move to Ruff-format in #1035
Remove pkg_resources and test command in #1014
Ruff moved to astral-sh in #1007
Target-version no longer needed by Black or Ruff in #1008
Update ruff and fix warnings in #1060
Use 2x faster black mirror in #1021
Group dependabot updates in #1054
macos-latest is changing to macos-14 ARM runners in #1083
Skip win PyPy PEP 518 in #1091
Scikit-build 0.17.6
A small fix release with some new platforms and better testing, including CPython 3.12.0b1.
Bug fixes
Support added for AIX (with recent CMake) by @bhuntsman in #988.
Testing
Miscellaneous
Docs improvements in #979.
Scikit-build 0.17.5
A small fix release fixing the passing on of generator specific arguments. This fixes some cases where the Ninja generator was found but then was unable to build. NetBSD was reported to work, so was added to the BSD’s supported.
Bug fixes
Scikit-build 0.17.4
A followup fix to the issue 0.17.3 tried to fix. We now have a method to manually test downstream packages, too.
Bug fixes
Make sure include dir is found even if the lib is not present in #974.
Scikit-build 0.17.3
A small release related to PYTHON_LIBRARY handling changes in 0.17.2; scikit-build 0.17.3 returns an empty string from get_python_library if no Python library is present (like on manylinux), where 0.17.2 returned None, and previous versions returned a non-existent path. Note that adding REQUIRED to find_package(PythonLibs will fail, but it is incorrect (you must not link to libPython.so) and was really just injecting a non-existent path before.
Bug fixes
Scikit-build 0.17.2
Another small release with fixes for non-MSVC Windows platforms.
Bug fixes
Testing
Hide a few warnings that are expected in #948.
Scikit-build 0.17.1
This is a small release fixing a few bugs; the primary one being a change that was triggering a bug in older FindPython. The unused variable messages have been deactivated to simplify output, as well.
Bug fixes
Testing
Scikit-build 0.17.0
A lot of bug fixes are present in this release, focusing on Windows, PyPy, and cross compiling. We’ve also improved the compatibility with default setuptools behaviors a little, and enabled some things that were previously unavailable, like overriding the build type via the cmake argument environment variables. We’ve expanded our CI matrix to include Windows and macOS PyPy and some Fortran tests on Linux. This release requires Python 3.7+.
Bug fixes
Match setuptools behavior for include_package_data default. by @vyasr in #873.
Misc. fixes for F2PY and PythonExtensions modules by @benbovy in #495.
Provide more useful error if user provides CMAKE_INSTALL_PREFIX by @vyasr in #872.
Stop assuming that .pyx files are in the same directory as CMakeLists.txt by @vyasr in #871.
Allow build type overriding in #902.
Detect PyPy library correctly on Windows by user:gershnik in #904.
Include library for FindPython for better Windows cross-compiles in #913. Thanks to user:maxbachmann for testing.
Fix logic for default generator when cross-compiling for ARM on Windows in #917 by @dlech.
Use f2py’s get_include if present in #877.
Fix support for cross-compilation exception using targetLinkLibrariesWithDynamicLookup by @erykoff in #901.
Treat empty MACOSX_DEPLOYMENT_TARGET as if it was unset in #918.
Testing
Miscellaneous
Publications
Please use the first citation when referencing scikit-build in scientific publications.
Jean-Christophe Fillion-Robin, Matt McCormick, Omar Padron, Max Smolens, Michael Grauer, & Michael Sarahan. (2018, July 13). jcfr/scipy_2018_scikit-build_talk: SciPy 2018 Talk | scikit-build: A Build System Generator for CPython C/C++/Fortran/Cython Extensions. Zenodo. https://doi.org/10.5281/zenodo.2565368
Schreiner, Henry, Rickerby, Joe, Grosse-Kunstleve, Ralf, Jakob, Wenzel, Darbois, Matthieu, Gokaslan, Aaron, Fillion-Robin, Jean-Christophe, & McCormick, Matt. (2022, August 1). Building Binary Extensions with pybind11, scikit-build, and cibuildwheel. https://doi.org/10.25080/majora-212e5952-033
History
PyCMake was created at SciPy 2014 in response to general difficulties building C++ and Fortran based Python extensions across platforms. It was renamed to “scikit-build” in 2016. Scikit-build-core was started in 2022.
Known Issues
These issues are likely to be addressed in upcoming releases, and are already addressed in scikit-build-core.
Editable installs do not work with the latest versions of Setuptools (and had issues with older versions, too).
Configuration scikit-build cares about _must_ be specified in setup() currently.
The cache directory (_skbuild) may need to be deleted between builds in some cases (like rebuilding with a different Python interpreter).
AIX requires a newer version of CMake than the IBM-supplied CMake 3.22.0 from the AIX Toolbox for Open Source Software. We currently recommend building CMake from source on AIX.
We are also working on improving scikit-build, so there are some upcoming changes and deprecations:
All deprecated setuptools/distutils features are also deprecated in scikit-build, like the test command, easy_install, etc.
Older versions of CMake (<3.15) are not recommended; a future version will remove support for older CMake’s (along with providing a better mechanism for ensuring a proper CMake is available).
If you need any of these features, please open or find an issue explaining what and why you need something.
Miscellaneous
Free software: MIT license
Documentation: http://scikit-build.readthedocs.org
Source code: https://github.com/scikit-build/scikit-build
Discussions: https://github.com/orgs/scikit-build/discussions
Scikit-build-core: https://github.com/scikit-build/scikit-build-core
Support for this work was provided by NSF grant OAC-2209877.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scikit_build-0.18.0.tar.gz
.
File metadata
- Download URL: scikit_build-0.18.0.tar.gz
- Upload date:
- Size: 273.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a13af467d1a38510c3494786e2edb73ead53ea922bde6e519dc5372aa65096 |
|
MD5 | 50999e6e4a65ca1ff7a6231083d5769f |
|
BLAKE2b-256 | 14603ee697797d2d28c7457c315948b22c39ce5611e6d4b26043e4e31b9fb712 |
File details
Details for the file scikit_build-0.18.0-py3-none-any.whl
.
File metadata
- Download URL: scikit_build-0.18.0-py3-none-any.whl
- Upload date:
- Size: 85.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea171f5529e6e0b5b666193433831af61a28d7edf973b33884ec8c782a15ee38 |
|
MD5 | e0caa4ec9f06add5973616ceeab26ffa |
|
BLAKE2b-256 | 2443a0b5837cf30db1561a04187edd262bdefaffcb61222cb441eadef35f9103 |