Allow excluding certain packages from pip-sync
What's the problem this feature will solve?
When running pip-sync, it will uninstall also editable package(s) and you need to pip install -e . them again. This adds unnecessary steps. Adding support for pip-sync --ignore <packages...> or similar would allow to avoid that.
This topic has been discussed in https://github.com/jazzband/pip-tools/issues/686. However, that one was closed with the assumption that if non-declared packages don't need to be touched, vanilla pip install -r requirements.txt will do.
The difference here is that while I do want to uninstall all the non-declared packages, I also want to retain the editable packages.
Describe the solution you'd like
Maybe:
pip-sync --ignore "(my-package1|my-package2)" # regex
pip-sync --ignore my-package1 --ignore my-package2My problem is specifically with editable packages. So it also could be:
pip-sync --ignore-editable...but I'm not sure how difficult it would be find out which of the packages are actually editable and which are not. Also, former suggestion is more generic, should someone want to exclude actual, non-editable, packages.
Alternative Solutions
My workaround currently is to simply run pip install -e . always after pip-sync.
Source: jazzband/pip-tools