2.9 KiB
Environment plugins
See the documentation for environment configuration.
Known third-party
- hatch-conda - environments backed by Conda/Mamba
- hatch-containers - environments run inside containers
- hatch-pip-compile - use pip-compile to manage project dependencies and lockfiles
- hatch-pip-deepfreeze - virtual environments with dependency locking by pip-deepfreeze
Installation
Any required environment types that are not built-in must be manually installed alongside Hatch or listed in the tool.hatch.env.requires
array for automatic management:
[tool.hatch.env]
requires = [
"...",
]
Life cycle
Whenever an environment is used, the following logic is performed:
::: hatch.project.core.Project.prepare_environment options: show_root_heading: false show_root_toc_entry: false
Build environments
All environment types should offer support for synchronized storage between the local file system and the environment. This functionality is used in the following scenarios:
- the
build
command - commands that read dependencies, like
dep hash
, if any project dependencies are set dynamically
::: hatch.env.plugin.interface.EnvironmentInterface options: members: - PLUGIN_NAME - find - create - remove - exists - install_project - install_project_dev_mode - dependencies_in_sync - sync_dependencies - dependency_hash - project_root - sep - pathsep - fs_context - activate - deactivate - app_status_creation - app_status_pre_installation - app_status_post_installation - app_status_project_installation - app_status_dependency_state_check - app_status_dependency_installation_check - app_status_dependency_synchronization - app - root - name - data_directory - isolated_data_directory - config - platform - environment_dependencies - dependencies - env_vars - env_include - env_exclude - platforms - skip_install - dev_mode - description - command_context - enter_shell - run_shell_command - resolve_commands - get_env_vars - apply_features - construct_pip_install_command - join_command_args - check_compatibility - get_option_types - get_env_var_option - get_context