virtualenv/web/res/res_create_env.py
author ymh <ymh.work@gmail.com>
Tue, 31 Jul 2012 17:44:44 +0200
changeset 723 6fe56c8896e3
parent 718 5e27a39d3742
child 727 0e91e924b945
permissions -rw-r--r--
update virtualenv configuration to include elasticsearch elements. Elasticsearch itself still has to be installed independantly

import platform

from lib_create_env import lib_generate_install_methods

system_str = platform.system()


INSTALLS = [ #(key,method, option_str, dict_extra_env)
    'LXML',
    'PSYCOPG2',
    'SOUTH',
    'PIL', 
    'DJANGO',
    'DJANGO-EXTENSIONS',
    'DJANGO-REGISTRATION',
    'DJANGO-TAGGING',
    'DJANGO-PISTON',
    'HTTPLIB2',
    'OAUTH2',
    'DJANGO-OAUTH-PLUS',
    'OPENID',
    'DJANGO_OPENID_CONSUMER',
    'SOCIAL_AUTH',
    'DJANGO_GUARDIAN',
    'SORL_THUMBNAIL',
    'HAYSTACK',
    'REQUESTS',
    'PYELASTICSEARCH',
]

if system_str == "Linux":
    INSTALLS.insert(2, 'DISTRIBUTE')

OPTIONS_TO_ADD = ['clear', 'type_install=local', 'unzip_setuptools']
if system_str != 'Linux':
    OPTIONS_TO_ADD.append('use_distribute')

def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)