Skip to main content

Crate ty_site_packages

Crate ty_site_packages 

Source
Expand description

Utilities for finding the site-packages directory, into which third-party packages are installed.

The routines exposed by this module have different behaviour depending on the platform of the host machine, which may be different from the target platform for type checking. (A user might be running ty on a Windows machine, but might reasonably ask us to type-check code assuming that the code runs on Linux.)

Structs§

PythonVersionFileSource
Information regarding the file and TextRange of the configuration from which we inferred the Python version.
PythonVersionWithSource
A Python version with its source.
SitePackagesPaths
An ordered, deduplicated set of site-packages search paths.
SysPrefixPath
A path that represents the value of sys.prefix at runtime in Python for a given Python executable.
SystemEnvironment
A Python environment that is not a virtual environment.
VirtualEnvironment
Abstraction for a Python virtual environment.

Enums§

PythonEnvironment
PythonVersionSource
The source of the Python version.
PyvenvCfgParseErrorKind
The various ways in which parsing a pyvenv.cfg file could fail
SitePackagesDiscoveryError
Enumeration of ways in which site-packages discovery can fail.
StdlibDiscoveryError
Enumeration of ways in which stdlib discovery can fail.
SysPrefixPathOrigin
Enumeration of sources a sys.prefix path can come from.