Skip to main content

Improved build system generator for Python C/C++/Fortran/Cython extensions

Project description

https://github.com/scikit-build/scikit-build/actions/workflows/ci.yml/badge.svg https://dev.azure.com/scikit-build/scikit-build/_apis/build/status/scikit-build.scikit-build?branchName=main Code coverage status GitHub Discussion

Improved build system generator for CPython C/C++/Fortran/Cython extensions.

Better support is available for additional compilers, build systems, cross compilation, and locating dependencies and determining their build requirements.

The scikit-build package is fundamentally just glue between the setuptools Python module and CMake.

To get started, see this example and scikit-build-sample-projects.

Latest Release

Versions

Downloads

https://img.shields.io/pypi/v/scikit-build.svg https://img.shields.io/pypi/dm/scikit-build
https://anaconda.org/conda-forge/scikit-build/badges/version.svg https://anaconda.org/conda-forge/scikit-build/badges/downloads.svg

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

  • Older (<3.24) CMake breaks when lib specified in #932

  • An error output was missing formatting in #931

  • Make empty CMAKE_OSX_DEPLOYMENT_TARGET a warning (bug in conda-forge’s clang activation fixed upstream) in #934

  • Remove unused variable warnings by in #930

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

  • Add hello fortran sample package + tests by @benbovy in #493.

  • Add sdist check & fix in #906.

  • Fix some setuptools types in #888.

  • Add PyPy Win & macOS to the CI in #907.

  • Add tests for Python 3.12 Linux alphas in #922.

Miscellaneous

  • Drop Python 3.6 in #862.

  • Move building backend to hatchling in #870.

  • Avoid mutating function input parameters in #899.

  • Use _compat/typing name in #869.

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.

Known Issues

These issues are likely to be addressed in upcoming releases.

  • 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).

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

Support for this work was provided by NSF cooperative agreement OAC-2209877.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit_build-0.17.1.tar.gz (267.9 kB view details)

Uploaded Source

Built Distribution

scikit_build-0.17.1-py3-none-any.whl (82.0 kB view details)

Uploaded Python 3

File details

Details for the file scikit_build-0.17.1.tar.gz.

File metadata

  • Download URL: scikit_build-0.17.1.tar.gz
  • Upload date:
  • Size: 267.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for scikit_build-0.17.1.tar.gz
Algorithm Hash digest
SHA256 17e716b29c8d3eb99edeadb0b8f7c2cd7683993aeb00e50c6db84b6d8765386c
MD5 30ee8f2b344c95c28cb87958962c6f36
BLAKE2b-256 913b5b21f6475df037086ddef575170af11277567aa0c44cd8cada705c0e0d18

See more details on using hashes here.

Provenance

File details

Details for the file scikit_build-0.17.1-py3-none-any.whl.

File metadata

File hashes

Hashes for scikit_build-0.17.1-py3-none-any.whl
Algorithm Hash digest
SHA256 63129e7fb404a0e2eae303d87e5e308aa7c2fca94174736c5e47f9486d05ac42
MD5 bb2d150528917b2d2baf48d5f45f864d
BLAKE2b-256 4a645b8351d86cbf2257fbff39b70da9e261e684e594661333e99b43e07e2a93

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page