Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First stab at a script to install virtualenv #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions install_venv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
set -ue
if [[ -n "$( pwd | grep -o -P ' ' )" ]]; then
echo "Warning! Working directory contains spaces, virtualenv might have problems with it!"
fi
if [ ! -d venv ]; then
virtualenv --verbose venv
fi
./venv/bin/easy_install markdown html5lib python-openid South psycopg2 mysql-python python-memcached django==1.3.1 django-debug-toolbar django-endless-pagination
echo "Virtualenv installed to ./venv"
8 changes: 8 additions & 0 deletions osqa.wsgi.dist
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import os.path
file_path = os.path.dirname(os.path.abspath(__file__))
one_level_up = os.path.dirname(file_path)
file_dir = os.path.basename(file_path)
activate_this = os.path.join(file_path, 'venv', 'bin', 'activate_this.py')
if os.path.isfile(activate_this):
execfile(activate_this, dict(__file__=activate_this))

import os
import sys
sys.path.append('/path/to_dir_above')
Expand Down