prefix_data#

Tools for managing the packages installed within an environment.

Classes#

PrefixDataType

Basic caching of PrefixData instance objects.

PrefixData

Functions#

get_conda_anchor_files_and_records(...)

Return the anchor files for the conda records of python packages.

get_python_version_for_prefix(prefix)

delete_prefix_from_linked_data(→ bool)

Here, path may be a complete prefix or a dist inside a prefix

class PrefixDataType#

Bases: type

Basic caching of PrefixData instance objects.

__call__(prefix_path: str | os.PathLike | pathlib.Path, pip_interop_enabled: bool | None = None)#

Call self as a function.

class PrefixData(prefix_path: str | os.PathLike[str] | pathlib.Path, pip_interop_enabled: bool | None = None)#
property _prefix_records#
property is_writable#
property _python_pkg_record#

Return the prefix record for the package python.

_cache_: dict[pathlib.Path, PrefixData]#
__eq__(other: Any) bool#

Return self==value.

load()#
reload()#
_get_json_fn(prefix_record)#
insert(prefix_record, remove_auth=True)#
remove(package_name)#
get(package_name, default=NULL)#
iter_records()#
iter_records_sorted()#
all_subdir_urls()#
query(package_ref_or_match_spec)#
_load_single_record(prefix_record_json_path)#
_load_site_packages()#

Load non-conda-installed python packages in the site-packages of the prefix.

Python packages not handled by conda are installed via other means, like using pip or using python setup.py develop for local development.

Packages found that are not handled by conda are converted into a prefix record and handled in memory.

Packages clobbering conda packages (i.e. the conda-meta record) are removed from the in memory representation.

_get_environment_state_file()#
_write_environment_state_file(state)#
get_environment_env_vars()#
set_environment_env_vars(env_vars)#
unset_environment_env_vars(env_vars)#
get_conda_anchor_files_and_records(site_packages_short_path, python_records)#

Return the anchor files for the conda records of python packages.

get_python_version_for_prefix(prefix)#
delete_prefix_from_linked_data(path: str | os.PathLike | pathlib.Path) bool#

Here, path may be a complete prefix or a dist inside a prefix