Actually you don't need to use a local checkout if you don't wish, you can just use pip
with a remote repository directly (make sure you're in a virtualenv first!):
pip install git+https://github.com/tweepy/tweepy.git
This does a local checkout in a temporary directory and then installs it normally from there, cleaning up the temporary directory afterwards. This approach has the advantage you can easily upgrade it later:
pip install --upgrade git+https://github.com/tweepy/tweepy.git
And also uninstall it:
The disadvantage is that if you wish to create a new virtualenv later and do another install, it will always use the latest HEAD revision from the repository so your environment isn't quite so repeatable. If you use your own repository, you can control when you fetch from it so you have a little more control, at the expense of a little more hassle. In this case, I would still use pip
for uninstall support - you can do an editable install like this:
git clone https://github.com/tweepy/tweepy.git
pip install -e ./tweepy
This basically just links the repository code into your virtualenv so that you can import it like a regular module, but any edits or updates you make to the repository will be immediately reflected in your environment. If you want to do a regular install of a local checkout instead of an editable one (i.e. where it installs a copy into the local environment instead of linking direct to the repo) then just omit the -e
.
See pip
's VCS support documentation for more details of supported repository types.