-
Notifications
You must be signed in to change notification settings - Fork 430
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
pipx install from URL results in twice-cloned git repo #381
Comments
In that case, is there any way to make it so that it only clones once? And still determines the package name from the downloaded repo? |
Just looking at the source, could we maybe keep the dir from |
That's a good suggestion, but it's nice to have all the venvs in once place, and named with the package name. It was also suggested to rename the temp venv after the name is determined, but that was shot down. #147 (comment). Maybe there is a way to do it, I don't think we tried to hard to make it happen. Feel free to hack on it and if you get something that works, submit a PR. |
I think the The only pitfalls I can spot is that we'd have to cleanup the tempdir ourselves. |
pipx creates a venv to isolate the installation, which is required to get the name. pip itself decides how to install things, including where to clone the repo to if a VCS specification is being installed, which are the two dirs you mentioned. Maybe there is a pip API that allows finer grained control of this, but it's not something pipx can control other than setting environment variables or passing arguments to pip. |
|
Looking into it further, it looks like this would require quite a bit of work either on our side or |
One possible improvement for Git specifically is that the second call can clone the local repository instead of the original remote repository. But that smells like a hack to me… |
Yes, originally we discussed ways to avoid installing twice, but this seemed the simplest way. Also, the first time in the temp directory only the main package is installed (not the dependencies) so that speeds things up a little. |
Closing this because it has been discussed here and before. |
Describe the bug
When running
pipx install --verbose git+https://github.com/mygitrepo/here.git
, the repo is cloned twice.How to reproduce
Run
pipx install --verbose git+https://github.com/yourgitrepo/here.git
Example output:
Expected behavior
The repo should only be cloned a single time.
The text was updated successfully, but these errors were encountered: