flit icon indicating copy to clipboard operation
flit copied to clipboard

Add `upgrade` option to `flit install`

Open mgax opened this issue 1 year ago • 2 comments
trafficstars

When developing a library that is set up with Flit, it's common to run flit install to try out the library in a virtualenv. After a while, dependencies might get out of date, so one might want to upgrade them, within the constraints of the library's dependencies. Right now it seems that you'd have to recreate the virtualenv and re-run flit install to achieve this.

mgax avatar May 08 '24 09:05 mgax

I think pip install . --upgrade-strategy eager would do it. You can also pass that through flit as an environment variable: PIP_UPGRADE_STRATEGY=eager flit install.

I'm reluctant to add wrappers for all of pip's many CLI options. flit install is kind of only hanging around because I prefer my --symlink option to the way editable installs work with pip. :shrug:

takluyver avatar May 08 '24 10:05 takluyver

I think pip install . --upgrade-strategy eager would do it.

Nope, but pip install . --upgrade-strategy eager --upgrade will upgrade dependencies.

You can also pass that through flit as an environment variable: PIP_UPGRADE_STRATEGY=eager flit install.

That also doesn't upgrade things, perhaps for the same reason.


@takluyver thanks for looking into this! TBH I don't really mind using pip install -e . --upgrade, this just seemed like an obvious missing feature of flit install.

mgax avatar May 08 '24 11:05 mgax