There's a few options open to you:
Install directly from Github
Add the following (replace with your forked repository) to a requirements.txt
file or install directly with pip install
:
git+git://github.com/revsys/django-friendship.git#egg=django-friendship
This will download a copy of your repository into your python environment. If you make changes to the repository however, you'll need to reinstall this every time you push changes.
Download a local copy and install
This method is much cleaner:
// Clone the repository locally
git clone https://github.com/revsys/django-friendship.git
// cd into the project folder
cd django-friendship
// Install the package into your python environment
// The `-e` tells pip this package is editable
pip install -e .
The project is now linked directly. You can now work on the forked repository locally and the changes will be available to your app straight away.
In your requirements.txt
file you'll want to add the following for deployment later:
git+git://github.com/revsys/django-friendship.git#egg=django-friendship
Take a look at the docs for pip for more information on dependency management.
virtualenv
? You could add that specific GitHub repo to yourrequirements.txt
and install the forked version rather than the original (see e.g. https://mcmap.net/q/21611/-how-to-state-in-requirements-txt-a-direct-github-source/3001761), or add the fork as asubmodule
. – Ampouledjango-friendship
fork is on github. Can I still do that? – Flattishgit
(BitBucket also supportshg
, in which case I doubt it's even possible) I think that should be fine. Give it a go and see what happens! – Ampoule