1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
[]
= ["maturin>=1.5,<2.0"]
= "maturin"
[]
= "pyrucast"
# La version n'est déclarée qu'une fois, dans Cargo.toml : maturin la lit là, et
# `pyrucast.__version__` en vient déjà (`src/lib.rs`, env!("CARGO_PKG_VERSION")).
# Deux déclarations laisseraient publier un crate et une wheel divergents sous le
# même tag.
= ["version"]
= "Finite-element library in Rust, inspired by cast3m, exposed to Python"
= "README.md"
= ">=3.11"
= "MPL-2.0"
= [{ = "Gauthier F" }]
= [
"Development Status :: 3 - Alpha",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Programming Language :: Rust",
]
[]
= "https://github.com/Pyrucast/pyrucast"
[]
# Pin the binding type. `pyo3` is an *optional* Cargo dependency (so a pure
# `cargo build` links no Python), which means maturin's auto-detection does
# not see it and wrongly falls back to `cffi` — it then runs its bundled
# cbindgen, which panics on our `Point2` type alias. Stating `pyo3`
# explicitly skips that guess.
= "pyo3"
# Enable the Cargo `extension-module` feature (correct Python linkage).
= ["extension-module"]
# Mixed Rust/Python layout: the pure-Python sources live in `python/` (package
# `python/pyrucast/`) and the compiled extension is placed inside that package
# as the private submodule `_pyrucast`. `pyrucast/__init__.py` re-exports it
# (`from ._pyrucast import *`) and adds the high-level Python layer, so
# `import pyrucast` keeps exposing every Rust symbol unchanged.
= "python"
= "pyrucast._pyrucast"
[]
# Style standard ruff (≈ black). On épingle la cible de version ; le reste
# suit les défauts (line-length = 88). `ruff format` met en forme les exemples
# et la suite de tests Python ; `ruff format --check` garde le standard (cf.
# script/check.sh).
= "py311"
# Le stub de l'extension est généré par `stub_gen` (cargo) : le laisser hors de
# ruff, sinon il dériverait à chaque régénération.
= ["python/pyrucast/_pyrucast/__init__.pyi"]
[]
# ruff's default rules for the version CI pins (0.16.4, see
# .github/workflows/release.yml); `ruff check` runs in script/check_format.sh.
[]
# The book's examples come from these files, and an example shows its own
# imports: a module imported again inside an anchor is deliberate.
= ["F811"]
[]
= ["tests/python"]
# Les fichiers `test_doc_*.py` portent les exemples du book **au niveau
# module**, pour que l'extrait inclus s'affiche en colonne 0. Un exemple qui
# casse est donc une erreur de collecte : sans cette option, elle
# interromprait toute la session au lieu du seul fichier concerné.
# `-m "not gmsh"` : les tests de l'interface gmsh sortent de la passe normale.
# Un développeur qui n'y touche pas n'a pas à installer gmsh ; `check_gmsh.sh`
# les rattrape avec `pytest -m gmsh` (l'option de la ligne de commande
# l'emporte sur celle-ci).
= "--continue-on-collection-errors -m \"not gmsh and not medcoupling\""
= [
"gmsh: exige le module gmsh installé — lancé par script/check_gmsh.sh",
"medcoupling: exige le module medcoupling installé — lancé par script/check_medcoupling.sh",
]