Commit 54ea2a5
committed
Make pybind11 an optional build dependency
pybind11 is only used for pybind11.setup_helpers.ParallelCompile, which
parallelises the compilation of the C extensions; it provides no runtime
bindings. Wrap its import and use in try/except ImportError and drop it
from build-system.requires, so the wheel builds without pybind11 (compiling
serially) while still using it for parallel builds when it is installed.
Keep it discoverable via a PEP 735 "build" dependency group, so anyone who
wants parallel source builds can install it with e.g. "pip install --group
build". This lets distributions that do not want the extra build dependency
(e.g. OpenWrt) build Pillow without pulling in pybind11.1 parent c8c74c8 commit 54ea2a5
2 files changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
| |||
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
| |||
0 commit comments