requirements.txt
allows the following ways of specifying a dependency on a package in a git repository as of pip 7.0:1
[-e] git+git://git.myproject.org/SomeProject#egg=SomeProject
[-e] git+https://git.myproject.org/SomeProject#egg=SomeProject
[-e] git+ssh://git.myproject.org/SomeProject#egg=SomeProject
-e [email protected]:SomeProject#egg=SomeProject (deprecated as of Jan 2020)
For Github that means you can do (notice the omitted -e
):
git+git://github.com/mozilla/elasticutils.git#egg=elasticutils
Why the extra answer?
I got somewhat confused by the -e
flag in the other answers so here's my clarification:
The -e
or --editable
flag means that the package is installed in <venv path>/src/SomeProject
and thus not in the deeply buried <venv path>/lib/pythonX.X/site-packages/SomeProject
it would otherwise be placed in.2
Documentation