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
"""Wheel tagging.
Two things setuptools gets wrong by default for a package like this one, and both would ship a
wheel that lies about where it runs.
1. It is pure Python -- ctypes, no C extension -- so it works on ANY Python 3. Declaring
`has_ext_modules` to make the wheel platform-specific also makes setuptools tag it for the exact
CPython that built it (`cp39-cp39`), which would need one wheel per Python version for no reason.
`get_tag` puts it back to `py3-none`.
2. The platform tag must describe the LIBRARY, not the interpreter. A CPython built as universal2
makes setuptools tag the wheel `universal2` even when the dylib inside is arm64 only -- and that
wheel installs happily on an Intel Mac and fails at import. The build script computes the tag
from the actual binary and passes `--plat-name`; this only stops setuptools from overriding it.
"""
# setuptools < 70.1
"""Carries a compiled library, so the wheel is platform-specific."""
return True
return False
= False
, , =
return , ,