Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it safe to use pip with a git repo?

Tags:

python

github

pip

It is possible to use pip to install from a git repo using command pip install git+https://github.com/...

but is this safe for a production environment? Is there a way to protect from it being deleted without forking it, hosting myself, and merging any future updates?

like image 907
chrickso Avatar asked May 29 '12 21:05

chrickso


1 Answers

No it is not 100% "safe", github can go down while you need to checkout the source, the author can delete the repository (or do some disrupting change to it) ecc. ecc.

With pip you can specify a revision or a tag together with the repository link

eg. git+git://github.com/misterx/projectname.git@840d25bb9db9fbc801b9

this will checkout the revision 840d25bb9db9fbc801b9 no matter of the new versions so you do not end with unknown newer (broken) code.

What I normally do is to clone the project (unless I want to keep in sync with trunk) to my github account or somewhere else.

like image 185
Tommaso Barbugli Avatar answered Sep 21 '22 01:09

Tommaso Barbugli