virtualenv/web/res/res_create_env.py
author ymh <ymh.work@gmail.com>
Tue, 13 Nov 2012 16:20:34 +0100
changeset 38 0fe2f3f5466f
parent 37 b4ed8cdc654c
permissions -rwxr-xr-x
add basic pages and api endpoints
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',
14
1aa549c9a543 remove mysql installation
ymh <ymh.work@gmail.com>
parents: 1
diff changeset
    11
#    'MYSQL',
1
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
    'HTTPLIB2',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
    'OAUTH2',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    'SETUPTOOLS_HG',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    'WSGIREF',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
    'DJANGO-OAUTH-PLUS',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
    'OPENID',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
    'DJANGO_OPENID_CONSUMER',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
    'SOCIAL_AUTH',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    'DJANGO_GUARDIAN',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    'SORL_THUMBNAIL',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    'HAYSTACK',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    'REQUESTS',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    'PYELASTICSEARCH',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
    'WHOOSH',
37
b4ed8cdc654c update virtualenv + create the first file structure
ymh <ymh.work@gmail.com>
parents: 14
diff changeset
    32
    'MIMEPARSE',
38
0fe2f3f5466f add basic pages and api endpoints
ymh <ymh.work@gmail.com>
parents: 37
diff changeset
    33
    'SIX',
37
b4ed8cdc654c update virtualenv + create the first file structure
ymh <ymh.work@gmail.com>
parents: 14
diff changeset
    34
    'PYTHON-DATEUTIL',
b4ed8cdc654c update virtualenv + create the first file structure
ymh <ymh.work@gmail.com>
parents: 14
diff changeset
    35
    'PYYAML',
b4ed8cdc654c update virtualenv + create the first file structure
ymh <ymh.work@gmail.com>
parents: 14
diff changeset
    36
    'PYTHON-DIGEST',
b4ed8cdc654c update virtualenv + create the first file structure
ymh <ymh.work@gmail.com>
parents: 14
diff changeset
    37
    'DJANGO-TASTYPIE',
1
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
    'LDT',
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
]
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
if system_str == "Linux":
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
    INSTALLS.insert(2, 'DISTRIBUTE')
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
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
    45
if system_str != 'Linux':
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
    OPTIONS_TO_ADD.append('use_distribute')
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
08f6e99af174 prepare the installation of the ldt platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
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
    49
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)