Commit 1e35f599 authored by Craig Kerstiens's avatar Craig Kerstiens

updating to have pip conf and cleaning up exception

parent 5aa4e7c9
...@@ -33,6 +33,13 @@ done ...@@ -33,6 +33,13 @@ done
echo "-----> Preparing virtualenv version $(virtualenv --version)" echo "-----> Preparing virtualenv version $(virtualenv --version)"
virtualenv --no-site-packages . | sed -u 's/^/ /' virtualenv --no-site-packages . | sed -u 's/^/ /'
mkdir .pip
cat >>.pip/pip.conf <<EOF
[install]
use-mirrors = true
EOF
#echo "-----> Byte-compiling code" #echo "-----> Byte-compiling code"
find . -name "*.py" | grep -v bin/manage.py | xargs bin/python -m py_compile find . -name "*.py" | grep -v bin/manage.py | xargs bin/python -m py_compile
...@@ -59,13 +66,12 @@ try: ...@@ -59,13 +66,12 @@ try:
'HOST': url.hostname, 'HOST': url.hostname,
'PORT': url.port, 'PORT': url.port,
} }
if 'postgres' in os.environ['DATABASE_URL']: if url.scheme == 'postgres':
DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2', DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2',
if 'mysql' in os.environ['DATABASE_URL']: if url.scheme == 'mysql':
DATABASES['default']['ENGINE'] = 'django.db.backends.mysql', DATABASES['default']['ENGINE'] = 'django.db.backends.mysql',
except: except:
print "Unexpected error:", sys.exc_info() print "Unexpected error:", sys.exc_info()
raise
EOF EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment