environment-helpers¶
Collection of helpers for managing Python environments.
API Documentation¶
environment_helpers module¶
Collection of helpers for managing Python environments.
- class environment_helpers.CurrentEnvironment(*args, **kwargs)¶
Bases:
EnvironmentObject representing the current environment.
- property scheme: SchemeDict[Path]¶
Default install scheme for the environment.
- class environment_helpers.Environment(*args, **kwargs)¶
Bases:
ProtocolObject representing a Python environment.
- property introspectable: Introspectable¶
Introspectable object for the environment.
- property scheme: SchemeDict[Path]¶
Default install scheme for the environment.
- class environment_helpers.VirtualEnvironment(path)¶
Bases:
EnvironmentObject representing a virtual environment (using the
venvscheme).- property scheme: SchemeDict[Path]¶
Default install scheme for the environment.
- environment_helpers.create_venv(path, **kwargs)¶
- Return type:
environment_helpers.build module¶
- environment_helpers.build.build_sdist(srcdir, outdir, config_settings=None, isolated=True, quiet=False)¶
- Return type:
- environment_helpers.build.build_wheel(srcdir, outdir, config_settings=None, isolated=True, quiet=False)¶
- Return type:
environment_helpers.install module¶
environment_helpers.introspect module¶
- class environment_helpers.introspect.Introspectable(interpreter)¶
Bases:
object- call(func, *args, **kwargs)¶
Call the a function in the target environment.
- get_launcher_kind()¶
Find the launcher kind.
This helper needs to run the Python interpreter for the target environment.
- get_scheme(scheme=None)¶
Finds the installation paths for a certain Python install scheme.
This helper needs to run the Python interpreter for the target environment.
- Parameters:
- Return type:
- get_system_scheme()¶
Finds the installation paths for the system Python install scheme.
Certain vendors, such as Debian, have a different scheme for system packages. This function finds the install scheme for system packages.
This helper needs to run the Python interpreter for the target environment.
- Return type:
- get_version()¶
- Return type:
- class environment_helpers.introspect.PythonVersion(major, minor, micro, releaselevel, serial)¶
Bases:
NamedTuple
- environment_helpers.introspect.get_virtual_environment_scheme(path)¶
Calculates the installation paths for the scheme used by a certain virtual environment.
- environment_helpers.introspect.scheme_dict_as_sysconfig(scheme)¶
- Return type: