Closed davidfischer closed 11 years ago
Seems like this occurs only if you do not mention vcs in uri and the requirement is not editable, since
git+git://git.myproj.org/proj.git@v1.0#egg=proj -e git://git.myproj.org/proj.git@v1.0#egg=proj
both get parsed correctly.
Also it would be great if parse would be able to return commit(branch/tag) spec as a separate field. Maybe it is worth checking pip source? There should be a correct parser there, although this would introduce a rather heavy dependency.
Perhaps this should be two issues. Firstly, it looks like pip now supports regular git:// URIs (without git+ssh, etc.). The second part is that requirements should be able to parse out the branch/tag in a separate field.
As for looking at the pip source for the parser, the parser is not easily separable from the parts that actually do the install. That was part of my motivation for this project in the first place.
Thanks for helping me think of this more clearly @teferi. I created #10 as a result and this issue will be about parsing out the branch/tag/commit/reference data.
This works now.
>>> list(parse('-e git://git.myproject.org/MyProject.git@v1.0#egg=MyProject'))[0].revision
'v1.0'
I need to write out the full docs though on this and then release it.
Currently VCS URIs with branches, tags or commits generate a
ValueError
:However, these are valid according to the requirement file spec