Skip to content

Commit 8552eca

Browse files
asnellingmiss-islington
authored andcommitted
gh-90982: Document prefixes argument on site.getsitepackages (GH-31546)
(cherry picked from commit bc31217) Co-authored-by: Addison Snelling <addison@asnell.io>
1 parent d755701 commit 8552eca

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Doc/library/site.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,19 @@ Module contents
241241
used in :mod:`sitecustomize` or :mod:`usercustomize` (see above).
242242

243243

244-
.. function:: getsitepackages()
244+
.. function:: getsitepackages(prefixes=None)
245245

246246
Return a list containing all global site-packages directories.
247247

248+
For each directory present in *prefixes* (or :data:`PREFIXES` if *prefixes*
249+
is ``None``), this function will find its site-packages subdirectory
250+
depending on the system environment, and will return a list of full paths.
251+
248252
.. versionadded:: 3.2
249253

254+
.. versionchanged:: 3.3
255+
Add the optional *prefixes* argument.
256+
250257

251258
.. function:: getuserbase()
252259

0 commit comments

Comments
 (0)