-
-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow excluding certain packages from pip-sync #1309
Comments
Even with that workaround, thouhg, In other words, this workflow doesn't actually work:
So there's a hole to be filled here... |
Missing from this discussion right now is the option of putting your editable requirements in Disadvantages:
See my last comment from #204 for a more thorough summary of the relpath problems and links to relevant issues further upstream. All that said, for now, it will probably "just work" if you put your editable reqs in the in-file, with a form like
or just
|
@AndydeCleyre I thought I had tried that, but I was doing |
@tomasaschan If I can get #1329 merged in, the @tuukkamustonen Do you think putting your editable requirements in your in-file adequately serves your purpose? |
@AndydeCleyre I have yet to try it, but if it works I think it's a feasible workaround. I mean, better would be to allow ignoring certain packages as suggested, because people's workflows differ. Someone might not want to initialize all sub-projects always, and avoiding that would require splitting editable packages to several different files. Or maybe people don't use But yes indeed, your proposal ( |
Oops, accidentally clicked the wrong button. Was about to comment that I finally tried However, like already mentioned there are few drawback in packages getting uninstalled/re-installed with |
I'll be more keen on Meanwhile, let's iron out the essentials.
Another workaround, kind of a "hook": psync () { # [<pip-sync-arg>...]
pip-sync $@
if [[ -r post_pip_sync.sh ]]; then
./post_pip_sync.sh
fi
} And you put your custom commands for installing editables and whatever in that script. |
I would prefer This way, if I add Alternatively, I would also be fine if there is no extra flag and BTW, does PEP660 help with this? The aforementioned flit supports it as well. |
What's the problem this feature will solve?
When running
pip-sync
, it will uninstall also editable package(s) and you need topip install -e .
them again. This adds unnecessary steps. Adding support forpip-sync --ignore <packages...>
or similar would allow to avoid that.This topic has been discussed in #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:
My problem is specifically with editable packages. So it also could be:
...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 afterpip-sync
.The text was updated successfully, but these errors were encountered: