Skip to content

Commit

Permalink
Merge pull request twoscoops#8 from octaflop/master
Browse files Browse the repository at this point in the history
Updated README and wsgi.py
  • Loading branch information
pydanny committed Jan 22, 2013
2 parents 995dd89 + e7982cb commit 5381758
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Audrey Roy
Daniel Greenfeld
Juan Riaza
Faris Chebib
32 changes: 30 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,35 @@ You can choose a different name by running the same command but replacing the wo
Installation of Dependencies
============================

First, make sure you are using virtualenv (http://www.virtualenv.org).
First, make sure you are using virtualenv (http://www.virtualenv.org)::

$ mkvirtualenv --distribute icecream

You will also need to ensure that the virtualenv has the project directory
added to the path. Adding the project directory will allow `django-admin.py` to be able to change settings using the `--settings` flag.

In Linux and Mac OSX, you can install virtualenvwrapper (http://http://virtualenvwrapper.readthedocs.org/en/latest/), which will take care of adding the project path to the `site-directory` for you::

$ cd icecream && add2virtualenv `pwd`

In Windows, or if you're not comfortable using the command line, you will need
to add a `.pth` file to the `site-packages` of your virtualenv. If you have
been following the book's example for the virtualenv directory (pg. 12), then
you will need to add a python pathfile named `_virtualenv_path_extensions.pth`
to the `site-packages`. If you have been following the book, then your
virtualenv folder will be something like::

`~/.virtualenvs/icecream/lib/python2.7/site-directory/`

In the pathfile, you will want to include the following code (from
virtualenvwrapper):

import sys; sys.__plen = len(sys.path)
/home/<youruser>/icecream/icecream/
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)

Virtualenvwrapper takes care of this for you by creating the exact same file
using the `add2virtualenv` command (see above).

Then, depending on where you are installing dependencies:

Expand All @@ -33,4 +61,4 @@ For production::
Acknowledgements
================

Many thanks to Randall Degges
Many thanks to Randall Degges

0 comments on commit 5381758

Please sign in to comment.