virtualenv/web/res/res_create_env.py
changeset 668 b52724db32ab
parent 665 f4fed46efbde
child 671 fc56b4c9e4f3
--- a/virtualenv/web/res/res_create_env.py	Thu Jun 14 10:18:38 2012 +0200
+++ b/virtualenv/web/res/res_create_env.py	Thu Jun 14 15:01:50 2012 +0200
@@ -1,53 +1,39 @@
 import platform
 
-from lib_create_env import lib_generate_install_methods, install_pylucene, install_psycopg2
+from lib_create_env import lib_generate_install_methods, lib_add_options
 
 system_str = platform.system()
 
-if system_str == 'Windows':
-    INSTALLS = [
-    ('JCC','easy_install',None,None),
-    ('PSYCOPG2',install_psycopg2,None,None),
-    ('PYLUCENE','easy_install',None,None),
-    ]
-else:
-    INSTALLS = [
-    ('PYLUCENE',install_pylucene,None,None),
-    ('PSYCOPG2', 'pip', None, None),
-    ]
-
-if system_str == 'Linux':
-    INSTALLS.extend([
-    ('DISTRIBUTE', 'pip', None, None),
-    ])
 
-INSTALLS.extend([ #(key,method, option_str, dict_extra_env)
-    ('SOUTH', 'pip', None, None),
-    ('PIL', 'easy_install', None, None), 
-    ('DJANGO','pip', None, None),
-    ('DJANGO-EXTENSIONS', 'pip', None, None),
-    ('DJANGO-REGISTRATION', 'easy_install', '-Z', None),
-    ('DJANGO-TAGGING', 'pip', None, None),
-    ('DJANGO-PISTON', 'easy_install', None, None),
-    ('HTTPLIB2', 'pip', None, None),
-    ('OAUTH2', 'easy_install', None, None),
-    ('DJANGO-OAUTH-PLUS', 'pip', None, None),
-    ('OPENID', 'pip', None, None),
-    ('DJANGO_OPENID_CONSUMER', 'pip', None, None),
-    ('SOCIAL_AUTH', 'easy_install', None, None),
-    ('DJANGO_GUARDIAN', 'pip', None, None),
-    ('SORL_THUMBNAIL', 'pip', None, None),
-])
+INSTALLS = [ #(key,method, option_str, dict_extra_env)
+    'PYLUCENE',
+    'PSYCOPG2',
+    'SOUTH',
+    'PIL', 
+    'DJANGO',
+    'DJANGO-EXTENSIONS',
+    'DJANGO-REGISTRATION',
+    'DJANGO-TAGGING',
+    'DJANGO-PISTON',
+    'HTTPLIB2',
+    'OAUTH2',
+    'DJANGO-OAUTH-PLUS',
+    'OPENID',
+    'DJANGO_OPENID_CONSUMER',
+    'SOCIAL_AUTH',
+    'DJANGO_GUARDIAN',
+    'SORL_THUMBNAIL',
+    'LXML',
+]
 
-if system_str == "Darwin":
-    INSTALLS.extend([
-    ('LXML', 'easy_install', None, {'STATIC_DEPS': 'true', 'LIBXML2_VERSION': '2.7.8', 'LIBXSLT_VERSION': '1.1.26', 'LIBICONV_VERSION': '1.13.1'}),
-    ])
-else:
-    INSTALLS.extend([
-    ('LXML', 'easy_install', None, None),
-    ])
+if system_str == 'Windows':
+    INSTALLS.insert(0, 'JCC')
 
+OPTIONS_TO_ADD = ['--no-site-packages','--clear', '--type-install=local']
+if system_str == "Linux":
+    OPTIONS_TO_ADD.append("--unzip-setuptools")
 
 def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
     return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS)
+
+add_options = lambda : lib_add_options(OPTIONS_TO_ADD)