virtualenv/web/res/res_create_env.py
author ymh <ymh.work@gmail.com>
Thu, 19 May 2011 17:43:42 +0200
changeset 115 4cbd113cdc99
parent 86 c87350ebcddb
permissions -rw-r--r--
add static_url in context processors
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
68
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import platform
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
from lib_create_env import lib_generate_install_methods, install_pylucene, install_psycopg2
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
system_str = platform.system()
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
84
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
     7
if system_str == 'Windows':
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
     8
    INSTALLS = [
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
     9
    ('JCC','easy_install',None,None),
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    10
    ('PSYCOPG2',install_psycopg2,None,None),
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    11
    ('PYLUCENE','easy_install',None,None),
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    12
    ]
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    13
else:
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    14
    INSTALLS = [
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    15
    ('PYLUCENE',install_pylucene,None,None),
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    16
    ('PSYCOPG2', 'pip', None, None),
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    17
    ]
68
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
if system_str == 'Linux':
84
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    20
    INSTALLS.extend([
68
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    ('DISTRIBUTE', 'pip', None, None),
84
d7acd4e2c1c8 reorder install order for linux
ymh <ymh.work@gmail.com>
parents: 72
diff changeset
    22
    ])
68
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
INSTALLS.extend([ #(key,method, option_str, dict_extra_env)
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
    ('SETUPTOOLS-HG', 'pip', None, None), 
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    ('MYSQL', 'pip', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    ('PIL', 'easy_install', None, None), 
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    ('DJANGO','pip', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    ('DJANGO-EXTENSIONS', 'pip', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    ('DJANGO-REGISTRATION', 'easy_install', '-Z', None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
    ('DJANGO-TAGGING', 'pip', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    ('DJANGO-PISTON', 'pip', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
    ('HTTPLIB2', 'pip', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
    ('OAUTH2', 'easy_install', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
    ('DJANGO-OAUTH-PLUS', 'pip', None, None),
70
8e3281bcebc9 update virtualenv
ymh <ymh.work@gmail.com>
parents: 68
diff changeset
    36
    ('OPENID', 'pip', None, None),
8e3281bcebc9 update virtualenv
ymh <ymh.work@gmail.com>
parents: 68
diff changeset
    37
    ('DJANGO_OPENID_CONSUMER', 'pip', None, None),
8e3281bcebc9 update virtualenv
ymh <ymh.work@gmail.com>
parents: 68
diff changeset
    38
    ('SOCIAL_AUTH', 'easy_install', None, None),
68
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
    ('PHOTOLOGUE', 'pip', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
    ('MODELTRANSLATION', 'pip', None, None),
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
])
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
if system_str == "Darwin":
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
    INSTALLS.extend([
72
47e0f0eef1cc update blinkster
ymh <ymh.work@gmail.com>
parents: 70
diff changeset
    45
    ('LXML', 'easy_install', None, {'STATIC_DEPS': 'true', 'LIBXML2_VERSION': '2.7.8', 'LIBXSLT_VERSION': '1.1.26', 'LIBICONV_VERSION': '1.13.1'}),
68
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
    ])
86
c87350ebcddb correct virtual env creation on linux
ymh <ymh.work@gmail.com>
parents: 84
diff changeset
    47
else:
70
8e3281bcebc9 update virtualenv
ymh <ymh.work@gmail.com>
parents: 68
diff changeset
    48
    INSTALLS.extend([
8e3281bcebc9 update virtualenv
ymh <ymh.work@gmail.com>
parents: 68
diff changeset
    49
    ('LXML', 'easy_install', None, None),
8e3281bcebc9 update virtualenv
ymh <ymh.work@gmail.com>
parents: 68
diff changeset
    50
    ])
68
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
b40657713336 use platform and clean install files
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS)