Commit 6ea4835
committed
python-afs: Compatibility with Python 3.13
Python 3.13 introduces a header <lock.h>, which conflicts with OpenAFS's
identically-named header. Python 3.15 will probably rename it to
pylock.h[1], but it's here for Python 3.13 and probably Python 3.14[2].
In the interim, force OpenAFS's headers to come before Python's when
building python-afs. This is a little tricky, because Python's headers
use -I by default while OpenAFS's use -isystem, and -I headers all come
before -isystem ones. However, if we add Python headers with -isystem at
the start of the compiler command, Python's -I will be treated as a dup
of a system header, and Python's headers will be moved to the system
section of the search path. *However*, because they're at the *start* of
the search path, they'll still beat OpenAFS, so we need to also add
-isystem for OpenAFS at the start of the compiler command, so the
relative order among the system section is correct.
Upstream mit-athena/python-afs has an issue for this[3], but because Nix
builds weirdly, the patch I wrote there doesn't work for Nix.
[1] python/cpython#136759
[2] python/cpython#137075 (comment)
[3] mit-athena/python-afs#61 parent be6fcaf commit 6ea4835
1 file changed
Lines changed: 22 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
37 | 58 | | |
38 | 59 | | |
39 | 60 | | |
| |||
0 commit comments