From 9b36b9ee074a5288d6b8daafd89e0f6e9637d9e2 Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Fri, 23 Dec 2016 11:01:27 +0000 Subject: [PATCH] Add instructions for how to set up in a virtualenv Using a virtualenv is much better than globally installing all of the project's dependencies, as it doesn't pollute the global package space, and allows us to work just within the project folder. --- .gitignore | 1 + README.markdown | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3af9acd0c7..e5d058e273 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ docs/_build/* deps ghostdriver.log seahub/thumbnail/thumb/* +.virtualenv diff --git a/README.markdown b/README.markdown index 7b8f8e6fc9..9384e3174c 100644 --- a/README.markdown +++ b/README.markdown @@ -17,9 +17,14 @@ You can grab souce code from GitHub. $ git clone git://github.com/haiwen/seahub.git +Set up a virtualenv to install dependencies locally: + + $ virtualenv .virtualenv + $ . .virtualenv/bin/activate + Install python libraries by pip: - pip install -r requirements.txt + $ pip install -r requirements.txt Configuration @@ -38,7 +43,8 @@ Run and Verify Run as: - ./run-seahub.sh.template + $ . .virtualenv/bin/activate + $ ./run-seahub.sh.template Then open your browser, and input `http://localhost:8000/`, there should be a Login page. You can create admin account using `seahub-admin.py` script under `tools/` directory.