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

Extract discovery to it's own package #2074

Open
gaborbernat opened this issue Mar 1, 2021 · 15 comments
Open

Extract discovery to it's own package #2074

gaborbernat opened this issue Mar 1, 2021 · 15 comments

Comments

@gaborbernat
Copy link
Contributor

From pypa/pipx#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.

@gaborbernat
Copy link
Contributor Author

@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?

@pfmoore
Copy link
Member

pfmoore commented Mar 1, 2021

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.

@gaborbernat
Copy link
Contributor Author

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.

@pfmoore
Copy link
Member

pfmoore commented Mar 1, 2021

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.

@uranusjr
Copy link
Member

uranusjr commented Mar 1, 2021

Bringing this to the technical side of things, what dependencies are needed for the discovery logic?

@gaborbernat
Copy link
Contributor Author

gaborbernat commented Mar 1, 2021

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).

@gaborbernat
Copy link
Contributor Author

Seemns there's wasn't much request for this, so closing as not planned.

@dukecat0
Copy link
Member

dukecat0 commented Dec 7, 2023

@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.

@gaborbernat gaborbernat reopened this Dec 7, 2023
@gaborbernat
Copy link
Contributor Author

We can do this... Not sure when I will have time for it, however, definitely doable.

@dukecat0
Copy link
Member

dukecat0 commented Dec 7, 2023

Maybe I can try to extract the logic into a separate package first?

@gaborbernat
Copy link
Contributor Author

gaborbernat commented Dec 7, 2023

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.

@dukecat0
Copy link
Member

dukecat0 commented Dec 9, 2023

Should the cache part be removed? I personally think that it can be implemented in virtualenv.

@gaborbernat
Copy link
Contributor Author

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.

@gaborbernat
Copy link
Contributor Author

Started at https://github.com/tox-dev/py-discovery, will try to get something working by Monday 😊

@gaborbernat
Copy link
Contributor Author

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.

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

No branches or pull requests

4 participants