Upgrading Dependencies#
Upgrading all dependencies can be as simple as deleting your lockfile and recreating it by reactivating the environment:
If you're a user of the --upgrade
/ --upgrade-package
options on pip-compile
,
these features can be enabled on this plugin by using the environment variables
PIP_COMPILE_UPGRADE
and PIP_COMPILE_UPGRADE_PACKAGE
. When either of these
environment variables are set hatch
will force the lockfile to be regenerated
whenever the environment is activated.
command line interface
hatch-pip-compile
also makes a CLI available to handle the
the PIP_COMPILE_UPGRADE
/ PIP_COMPILE_UPGRADE_PACKAGE
workflow
automatically. See the hatch-pip-compile CLI
section for more information.
To run with upgrade
functionality on the default
environment:
To run with upgrade-package
functionality on the docs
environment:
The above commands call python --version
on a particular environment,
but the same behavior applies to any script that activates the environment.