@@ -37,11 +37,13 @@ There are also classic setuptools plugins:
3737
3838{: .important }
3939
40- If you have a really complex build, the newer native build backends might not
41- support your use case yet, but if that's the case, ask - development is driven
42- by community needs. The older, more fragile setuptools based plugins are still a
43- bit more flexible if you really need that flexibility for a feature not yet
44- implemented in the native backends.
40+ Selecting a backend: If you are using Rust, use maturin. If you are using CUDA,
41+ use scikit-build-core. If you are using a classic language (C, C++, Fortran),
42+ then you can use either scikit-build-core or meson-python, depending on whether
43+ you prefer writing CMake or Meson. Meson is a lot more opinionated; it requires
44+ you use version control, it requires a README.md and LICENSE file. It requires
45+ your compiler be properly set up. Etc. While CMake can be as elegant as Meson,
46+ there are a lot of historical examples of poorly written CMake.
4547
4648## pyproject.toml: build-system
4749
@@ -120,6 +122,10 @@ install(TARGETS _core DESTINATION ${SKBUILD_PROJECT_NAME})
120122<!-- prettier-ignore-end -->
121123<!-- [[[end]]] -->
122124
125+ Scikit-build-core will use your ` .gitignore ` to help it avoid adding ignored
126+ files to your distributions; it also has a default ignore for common cache
127+ files, so you can get started without one, but it's recommended.
128+
123129{% endtab %} {% tab meson Meson-python %}
124130
125131Example ` meson.build ` file (using pybind11, so include ` pybind11 ` in
@@ -157,6 +163,11 @@ install_subdir('src/package', install_dir: py.get_install_dir() / 'package', str
157163<!-- prettier-ignore-end -->
158164<!-- [[[end]]] -->
159165
166+ Meson also requires that ` LICENSE ` and ` README.md ` exist, and that your source
167+ be tracked by version control. In a real project, you will likely be doing this,
168+ but when trying out a build backend you might not think to add these even though
169+ they are required.
170+
160171{% endtab %} {% tab maturin Maturin %}
161172
162173Example ` Cargo.toml ` file:
@@ -277,6 +288,8 @@ PYBIND11_MODULE(_core, m) {
277288
278289{% endtab %} {% tab maturin Maturin %}
279290
291+ Example ` src/lib.rs ` file:
292+
280293<!-- [[[cog
281294with code_fence("rs"):
282295 print(maturin_src_lib_rs)
0 commit comments