virtualenv
virtualenv copied to clipboard
Extract discovery to it's own package
From https://github.com/pipxproject/pipx/issues/638 @uranusjr
I love virtualenv.discovery, but virtualenv is a big thing to pull in. I would reach for it every time if the functionality could be extracted into its own distribution.
@pfmoore may we get the py-discovery
package under PyPa? If so can you create a repo for it and make me admin of it?
The usual process is that you create a separate package under your own name, then propose it for PyPA inclusion on Discourse, and then it gets moved to the PyPA namespace. See the process here.
I don't see any reason why this shouldn't be straightforward - it sounds like a good idea to me.
That's usually the case with new projects, but in the case of splitting the existing ones, I've thought we don't need the intermediate step.
Honestly, I don't know - the process in PEP 609 was decided by the PyPA with @di as the PEP author (the discussion was here). I don't think I have the authority to modify it - my role is as PEP delegate for interoperability PEPs, not PyPA BDFL.
I agree that splitting out part of an existing project should be straightforward - the process should be just a formality.
Bringing this to the technical side of things, what dependencies are needed for the discovery logic?
Can be made no dependency at all :-) Depends on how much we extract, and how much we leave behind. (if we keep everything I think appdris, filelock).
Seemns there's wasn't much request for this, so closing as not planned.
@gaborbernat Is there any chance to get this reopen? Recently I am implementing pipx install-all
and it will be helpful if it can locate a suitable python interpreter for installing the package.
We can do this... Not sure when I will have time for it, however, definitely doable.
Maybe I can try to extract the logic into a separate package first?
Sure 👍 feel free to add me as a reviewer. You can likely copy all the files from this project, remove the non discovery part, and rename it. That way should be fairly straightforward the review and moving it under PyPA.
Should the cache part be removed? I personally think that it can be implemented in virtualenv.
Removed, not, but doesn't need to be part of the extracted package 👍 Though the cache is very useful could be an extra at a future time.
Started at https://github.com/tox-dev/py-discovery, will try to get something working by Monday 😊
I have a first version that passes the CI and all that. However, removing the cache layer is very destructive, so I'll need to re-architecture it a bit more to integrate it back to virtualenv with caching, so it's not ready for a release just yet.