Skip to content
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

Add pip pmm support (draft) #198

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Add pip pmm support (draft) #198

wants to merge 4 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 31, 2020

First draft of attempting to add pip support for pmm. Any ways I could improve it?

@paradigm
Copy link
Member

paradigm commented Sep 2, 2020

Seems like a good start.

For things like

implementations["pip", "remove-packages-limited"]  = "strat -r ${stratum} pip ${flags} remove ${items}"
implementations["pip", "remove-packages-full"]     = ""

you'll want to populate both. Consider what happens if a user runs something like pmm purge <pip-package> here in contrast to what the user probably wants.

For

implementations["pip", "search-for-package-by-name"]   = "" # Can't figure out how to
implementations["pip", "search-for-package-by-all"]    = "" # differentiate between the two

I think you can

strat -r ${stratum} pip search ${items} | awk '{print$1}'

for the first and

strat -r ${stratum} pip search ${items} | awk '{print$1}' | grep ${items}

for the latter. If you figure out how to list available packages, | grep ${items} on it might be better or worse depending on how pip's search and list system works.

I don't know pip's nuances at all for things like populating other fields or explicit vs implicit handling.

@ghost
Copy link
Author

ghost commented Sep 3, 2020

Thanks for responding!
For "reinstall-packages" implementation, would it be clunky to use pip uninstall <pkg> && pip install <pkg>?
Also, I added your suggestions.

@paradigm
Copy link
Member

paradigm commented Sep 3, 2020

I'd prefer that to leaving it blank and confusing users when they try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant