@@ -32,14 +32,22 @@ It starts by constructing up to four directories from a head and a tail part.
32
32
For the head part, it uses ``sys.prefix `` and ``sys.exec_prefix ``; empty heads
33
33
are skipped. For the tail part, it uses the empty string and then
34
34
:file: `lib/site-packages ` (on Windows) or
35
- :file: `lib/python{ X.Y } /site-packages ` (on Unix and macOS). For each
35
+ :file: `lib/python{ X.Y[t] } /site-packages ` (on Unix and macOS). (The
36
+ optional suffix "t" indicates the :term: `free threading ` build, and is
37
+ appended if ``"t" `` is present in the :attr: `sys.abiflags ` constant.)
38
+ For each
36
39
of the distinct head-tail combinations, it sees if it refers to an existing
37
40
directory, and if so, adds it to ``sys.path `` and also inspects the newly
38
41
added path for configuration files.
39
42
40
43
.. versionchanged :: 3.5
41
44
Support for the "site-python" directory has been removed.
42
45
46
+ .. versionchanged :: 3.13
47
+ On Unix, :term: `Free threading <free threading> ` Python installations are
48
+ identified by the "t" suffix in the version-specific directory name, such as
49
+ :file: `lib/python3.13t/ `.
50
+
43
51
If a file named "pyvenv.cfg" exists one directory above sys.executable,
44
52
sys.prefix and sys.exec_prefix are set to that directory and
45
53
it is also checked for site-packages (sys.base_prefix and
@@ -188,11 +196,12 @@ Module contents
188
196
189
197
Path to the user site-packages for the running Python. Can be ``None `` if
190
198
:func: `getusersitepackages ` hasn't been called yet. Default value is
191
- :file: `~/.local/lib/python{ X.Y } /site-packages ` for UNIX and non-framework
199
+ :file: `~/.local/lib/python{ X.Y } [t] /site-packages ` for UNIX and non-framework
192
200
macOS builds, :file: `~/Library/Python/{ X.Y } /lib/python/site-packages ` for macOS
193
201
framework builds, and :file: `{ %APPDATA% } \\ Python\\ Python{ XY } \\ site-packages `
194
- on Windows. This directory is a site directory, which means that
195
- :file: `.pth ` files in it will be processed.
202
+ on Windows. The optional "t" indicates the free-threaded build. This
203
+ directory is a site directory, which means that :file: `.pth ` files in it
204
+ will be processed.
196
205
197
206
198
207
.. data :: USER_BASE
0 commit comments