pip-tools icon indicating copy to clipboard operation
pip-tools copied to clipboard

pip-sync re-installs editable packages

Open tuukkamustonen opened this issue 2 years ago • 3 comments

I think this is regression of https://github.com/jazzband/pip-tools/issues/399.

Environment Versions

  1. OS Type: Linux
  2. Python version: 3.7.10
  3. pip version: 21.3.1
  4. pip-tools version: 6.4.0

Steps to replicate

Having:

-e file:.

And proper setup.py file. Run pip-compile && pip-sync and same again.

Expected result

The package should be installed once (into editable mode) and subsequent runs should not uninstall and re-install the package.

Actual result

pip-sync re-installs the package each time.

tuukkamustonen avatar Nov 18 '21 19:11 tuukkamustonen

To be fair, even your standard pip install -r requirements.txt seems to always re-install the editable packages. Does the behavior come from pip?

tuukkamustonen avatar Nov 18 '21 19:11 tuukkamustonen

This does not come from pip but this makes sense since the code inside file:. might be changed at any time.

atugushev avatar Apr 06 '22 06:04 atugushev

So this is needed for syncing the changes in the package, like adding entry points and such.

Those change quite rarely, though (depends on your workflow, of course). Maybe allow skipping the re-installation with a new flag?

tuukkamustonen avatar Apr 08 '22 12:04 tuukkamustonen