virtualenv/web/res/res_create_env.py
author cavaliet
Wed, 26 Mar 2014 12:50:13 +0100
changeset 31 df2ca7a612ac
parent 2 bafbf72652b9
child 65 ac0c11fc869e
permissions -rwxr-xr-x
enhance ref_text filter and update venv with ldt
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     1
import platform
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     2
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     3
from lib_create_env import lib_generate_install_methods
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     4
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     5
system_str = platform.system()
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     6
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     7
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     8
INSTALLS = [ #(key,method, option_str, dict_extra_env)
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
     9
    'LXML',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    10
    'PSYCOPG2',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    11
    #'MYSQL',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    12
    'SOUTH',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    13
    'PIL', 
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    14
    'DJANGO',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    15
    'DJANGO-EXTENSIONS',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    16
    'DJANGO-REGISTRATION',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    17
    'DJANGO-TAGGING',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    18
    'HTTPLIB2',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    19
    'OAUTH2',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    20
    'SETUPTOOLS_HG',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    21
    'DJANGO-OAUTH-PLUS',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    22
    'OPENID',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    23
    'DJANGO_OPENID_CONSUMER',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    24
    'SOCIAL_AUTH',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    25
    'DJANGO_GUARDIAN',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    26
    'SORL_THUMBNAIL',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    27
    'HAYSTACK',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    28
    'REQUESTS',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    29
    'SIMPLEJSON',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    30
    'PYELASTICSEARCH',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    31
    'WHOOSH',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    32
    'MIMEPARSE',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    33
    'SIX',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    34
    'PYTHON-DATEUTIL',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    35
    'PYYAML',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    36
    'PYTHON-DIGEST',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    37
    'DEFUSEDXML',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    38
    'DJANGO-TASTYPIE',
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    39
    'DJANGO-CHUNCKED-UPLOADS',
31
df2ca7a612ac enhance ref_text filter and update venv with ldt
cavaliet
parents: 2
diff changeset
    40
    'LDT',
2
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    41
]
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    42
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    43
if system_str == "Linux":
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    44
    INSTALLS.insert(2, 'DISTRIBUTE')
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    45
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    46
OPTIONS_TO_ADD = ['clear', 'type_install=local', 'unzip_setuptools']
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    47
if system_str != 'Linux':
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    48
    OPTIONS_TO_ADD.append('use_distribute')
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    49
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    50
def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
bafbf72652b9 virtualenv first commit and structure for spel app
cavaliet
parents:
diff changeset
    51
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)