-
Notifications
You must be signed in to change notification settings - Fork 18
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
Reuse/copy pip code for VCS and download #1
Comments
Hi, can you tell me some steps that I should follow to solve this issue. |
From your description I understand that I should make a download.py file that should be like https://github.com/pypa/pip/blob/master/src/pip/_internal/download.py inside fetchcode. Are the steps correct? |
Now that we have an API the next step is this ticket. |
https://github.com/pypa/pip/blob/master/src/pip/_internal/download.py this is missing now, I am not able to open it |
It was there https://github.com/pypa/pip/blob/13ab7a2bce8fcde72b722cfc803d34671f1cd855/src/pip/_internal/download.py This parts that deal with VCS is more stable In anycase we will have to fork as there is no stable code API in pip |
A little doubt, do we expect user to have installed git, mercurial or whichever VCS repo user wants to download. |
@TG1999 yes. It would be nice if we cant use some library for Git, but reusing the command line should be simpler and this is how pip works and since this can be tricky code, best to reuse it |
@pombredanne wrote
@TG1999 replied
|
Hi, please can you explain me the steps :) |
@TG1999 the things to do could be on of these:
|
An alternative could be to look at https://github.com/juju/charm-helpers/tree/master/charmhelpers/fetch that has Git, bzr, http (and claims FTP support) |
Agreed @pombredanne I will send a PR by this weekend |
@pombredanne I think we can close this now :) |
pip is a good starting point as https://github.com/pypa/pip/blob/master/src/pip/_internal/download.py is a solid and reliable download utility tested with billions of downloads.
There are a few ways to handle this:
Note pip also handles VCS URLs
See https://github.com/pypa/pip/tree/master/src/pip/_internal/vcs
The download location specified in SPDX is mostly derived from the pip URLs https://github.com/spdx/spdx-spec/blob/db06dc81e525e08035af34117127742337e1f1b6/chapters/3-package-information.md#37-package-download-location-
pip does not handle ftp AFAIK
The text was updated successfully, but these errors were encountered: