This repository was archived by the owner on Feb 1, 2023. It is now read-only.
Commit d312143
Release Manager
Trac #30580: sage_setup: Remove import-time dependency (
Just loading `src/setup.py` already pulls in Cython, `numpy`, and
`pkgconfig` via `sage_setup`, so these distributions would have to be
declared as `[build_system] requires` in `src/pyproject.toml` (ex
`setup_requires`)
By moving some computations from import-time to runtime, we get rid of
this early dependency on `pkgconfig`, `numpy`. (They are, of course,
still required for building the package.)
This makes `setup.py sdist` work using a Python that does not have
`numpy `or `pkgconfig` installed. To test (with a system python that
has `Cython`):
{{{
$ (cd build/pkgs/sagelib/src && python3 -u setup.py --no-user-cfg
sdist)
}}}
(We also reduce the load-time dependency on Cython; however, we do not
address the whole load-time dependency of `setup.py` on `Cython` (via
`sage_setup.find`, which uses `open_source_file` and `is_package_dir`)
in this ticket. This is best done after #28925.)
URL: https://trac.sagemath.org/30580
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Dima Pasechniksetup_requires) on pkgconfig, numpy
File tree
2 files changed
+24
-24
lines changed- build/pkgs/sagelib/src
- src/sage_setup/command
2 files changed
+24
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | | - | |
62 | 60 | | |
63 | 61 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | | - | |
23 | | - | |
24 | 20 | | |
25 | 21 | | |
26 | 22 | | |
| |||
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 57 | | |
69 | 58 | | |
70 | 59 | | |
| |||
211 | 200 | | |
212 | 201 | | |
213 | 202 | | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
214 | 210 | | |
215 | 211 | | |
216 | 212 | | |
| |||
281 | 277 | | |
282 | 278 | | |
283 | 279 | | |
284 | | - | |
| 280 | + | |
285 | 281 | | |
286 | 282 | | |
287 | 283 | | |
| |||
322 | 318 | | |
323 | 319 | | |
324 | 320 | | |
325 | | - | |
| 321 | + | |
326 | 322 | | |
327 | 323 | | |
328 | 324 | | |
329 | | - | |
| 325 | + | |
330 | 326 | | |
331 | 327 | | |
| 328 | + | |
| 329 | + | |
332 | 330 | | |
0 commit comments