virtualenv/web/res/res_create_env.py
changeset 83 b7aef101c7d1
parent 68 5278175359e0
child 139 f7c6c59dff95
equal deleted inserted replaced
82:f8d77e53f7c2 83:b7aef101c7d1
     2 
     2 
     3 from lib_create_env import lib_generate_install_methods, install_pylucene, install_psycopg2
     3 from lib_create_env import lib_generate_install_methods, install_pylucene, install_psycopg2
     4 
     4 
     5 system_str = platform.system()
     5 system_str = platform.system()
     6 
     6 
       
     7 if system_str == 'Windows':
       
     8     INSTALLS = [
       
     9     ('JCC','easy_install',None,None),
       
    10     ('PSYCOPG2',install_psycopg2,None,None),
       
    11     ('PYLUCENE','easy_install',None,None),
       
    12     ]
       
    13 else:
       
    14     INSTALLS = [
       
    15     ('PYLUCENE',install_pylucene,None,None),
       
    16     ('PSYCOPG2', 'pip', None, None),
       
    17     ]
     7 
    18 
     8 if system_str == 'Linux':
    19 if system_str == 'Linux':
     9     INSTALLS = [
    20     INSTALLS.extend([
    10     ('DISTRIBUTE', 'pip', None, None),
    21     ('DISTRIBUTE', 'pip', None, None),
    11     ]
    22     ])
    12 else:
       
    13     INSTALLS = []
       
    14     
       
    15 
    23 
    16 INSTALLS.extend([ #(key,method, option_str, dict_extra_env)
    24 INSTALLS.extend([ #(key,method, option_str, dict_extra_env)
    17     ('SETUPTOOLS-HG', 'pip', None, None), 
    25     ('SETUPTOOLS-HG', 'pip', None, None), 
    18     ('MYSQL', 'pip', None, None),
    26     ('MYSQL', 'pip', None, None),
    19     ('PIL', 'easy_install', None, None), 
    27     ('PIL', 'easy_install', None, None), 
    28     ('OPENID', 'pip', None, None),
    36     ('OPENID', 'pip', None, None),
    29     ('DJANGO_OPENID_CONSUMER', 'pip', None, None),
    37     ('DJANGO_OPENID_CONSUMER', 'pip', None, None),
    30     ('SOCIAL_AUTH', 'easy_install', None, None),
    38     ('SOCIAL_AUTH', 'easy_install', None, None),
    31 ])
    39 ])
    32 
    40 
    33 if system_str == 'Windows':
       
    34     INSTALLS.extend([
       
    35     ('JCC','easy_install',None,None),
       
    36     ('PSYCOPG2',install_psycopg2,None,None),
       
    37     ('PYLUCENE','easy_install',None,None),
       
    38     ])
       
    39 else:
       
    40     INSTALLS.extend([
       
    41     ('PYLUCENE',install_pylucene,None,None),
       
    42     ('PSYCOPG2', 'pip', None, None),
       
    43     ])
       
    44 
       
    45 if system_str == "Darwin":
    41 if system_str == "Darwin":
    46     INSTALLS.extend([
    42     INSTALLS.extend([
    47     ('LXML', 'easy_install', None, {'STATIC_DEPS': 'true', 'LIBXML2_VERSION': '2.7.8', 'LIBXSLT_VERSION': '1.1.26', 'LIBICONV_VERSION': '1.13.1'}),
    43     ('LXML', 'easy_install', None, {'STATIC_DEPS': 'true', 'LIBXML2_VERSION': '2.7.8', 'LIBXSLT_VERSION': '1.1.26', 'LIBICONV_VERSION': '1.13.1'}),
    48     ])
    44     ])
    49 elif system_str == "Windows":
    45 else:
    50     INSTALLS.extend([
    46     INSTALLS.extend([
    51     ('LXML', 'easy_install', None, None),
    47     ('LXML', 'easy_install', None, None),
    52     ])
       
    53 else:
       
    54     INSTALLS.extend([
       
    55     ('LXML', 'pip', None, None),
       
    56     ])
    48     ])
    57 
    49 
    58 
    50 
    59 def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
    51 def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
    60     return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS)
    52     return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS)