Skip to content

Commit 5819f98

Browse files
henryiiipre-commit-ci[bot]Copilot
authored
fix: compiled page fixes (#711)
* fix: compiled page fixes Signed-off-by: Henry Schreiner <[email protected]> * style: pre-commit fixes * Apply suggestions from code review Co-authored-by: Copilot <[email protected]> * style: pre-commit fixes --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <[email protected]>
1 parent 1b2bb27 commit 5819f98

File tree

2 files changed

+23
-9
lines changed

2 files changed

+23
-9
lines changed

docs/_includes/pyproject.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The metadata is specified in a [standards-based][metadata] format:
55
```toml
66
[project]
77
name = "package"
8+
version = "0.1.0"
89
description = "A great package."
910
readme = "README.md"
1011
license = "BSD-3-Clause"
@@ -51,10 +52,10 @@ or [Whey](https://whey.readthedocs.io/en/latest/configuration.html). Note that
5152
The license can be done one of two ways.
5253

5354
The modern way is to use the `license` field and an [SPDX identifier
54-
expression][spdx]. You can specify a list of files globs in `license-files`.
55-
Currently, `hatchling>=1.26`, `flit-core>=1.11`, `pdm-backend>=2.4`,
56-
`setuptools>=77`, and `scikit-build-core>=0.12` support this. Only `maturin`,
57-
`meson-python`, and `flit-core` do not support this yet.
55+
expression][spdx]. You can specify a list of files globs in `license-files`. You
56+
need `hatchling>=1.26`, `flit-core>=1.11` (1.12 for complex license statements),
57+
`pdm-backend>=2.4`, `setuptools>=77`, `meson-python>=0.18`, `maturin>=1.9.2`,
58+
`poetry-core>=2.2`, or `scikit-build-core>=0.12` to support this.
5859

5960
The classic convention uses one or more [Trove Classifiers][] to specify the
6061
license. There also was a `license.file` field, required by `meson-python`, but

docs/pages/guides/packaging_compiled.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

125131
Example `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

162173
Example `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
281294
with code_fence("rs"):
282295
print(maturin_src_lib_rs)

0 commit comments

Comments
 (0)