virtualenv/web/res/res_create_env.py
author ymh <ymh.work@gmail.com>
Wed, 19 Sep 2012 01:57:47 +0900
changeset 1 08f6e99af174
child 14 1aa549c9a543
permissions -rwxr-xr-x
prepare the installation of the ldt platform
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import platform
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
from lib_create_env import lib_generate_install_methods
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
system_str = platform.system()
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
INSTALLS = [ #(key,method, option_str, dict_extra_env)
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
    'LXML',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    'PSYCOPG2',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    'MYSQL',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
    'SOUTH',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
    'PIL', 
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
    'DJANGO',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    'DJANGO-EXTENSIONS',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    'DJANGO-REGISTRATION',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
    'DJANGO-TAGGING',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
    'DJANGO-PISTON',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
    'HTTPLIB2',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    'OAUTH2',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    'SETUPTOOLS_HG',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
    'WSGIREF',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
    'DJANGO-OAUTH-PLUS',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    'OPENID',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
    'DJANGO_OPENID_CONSUMER',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    'SOCIAL_AUTH',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    'DJANGO_GUARDIAN',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    'SORL_THUMBNAIL',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    'HAYSTACK',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    'REQUESTS',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
    'PYELASTICSEARCH',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    'WHOOSH',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
    'LDT',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
]
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
if system_str == "Linux":
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
    INSTALLS.insert(2, 'DISTRIBUTE')
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
OPTIONS_TO_ADD = ['clear', 'type_install=local', 'unzip_setuptools']
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
if system_str != 'Linux':
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
    OPTIONS_TO_ADD.append('use_distribute')
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)