Open jayvdb opened 6 years ago
I think this makes sense, but will need reworking to avoid using pip.vcs import VcsSupport
now that #13 is fixed.
https://github.com/di/pip-api/pull/9 shows there is still an ongoing need for this. Even PEP 508 syntax isnt so useful, if you care about versions from VCS, which is my itch.
I've used a constant for the VCS schemes. They dont change much.
btw, I just found https://github.com/sarugaku/pip-shims , which would be another way to import pip.vcs ;-) It's Travis builds are not enabled, but https://travis-ci.org/jayvdb/pip-shims/builds/446012669 shows the matrix is quite extensive and green.
btw, I just found https://github.com/sarugaku/pip-shims , which would be another way to import pip.vcs
I'm not interested in using that project, it may be hard to tell but it's still importing pip's internal API, so it would be equivalent to regressing on #13.
Oh I saw what it is, and guessed you wouldnt want to use it, and can appreciate why. But still it is worth you knowing about it, and it would be quite stable for the internals of pip which dont move around very often, and it at least provides a centralise place for fixing any breakages. In the case of this PR, only a tiny amount of duplication of pip internals is needed, but it is worth reconsidering if there are large chunks of pip which are needed.
Rebased.
I see in pip-api there is now an error in _parse_editable
which lists the allowed prefixes
'%s should either be a path to a local project or a VCS url ' 'beginning with svn+, git+, hg+, or bzr+'
IMO that list should be a part of pip-api 's exposed API, replicating the list in pip internals.
There are many limitations to checking VCS requirements. Allow them to be ignored, similar to local requirements.
Related to https://github.com/di/pytest-reqs/issues/25