virtualenv/web/res/res_create_env.py
author ymh <ymh.work@gmail.com>
Sun, 09 Sep 2012 21:35:10 +0200
changeset 243 1f2840354865
parent 229 8d01de23b56b
child 271 8f77cf71ab02
permissions -rw-r--r--
correct filter on tag completion to avoid tags that are not translated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import platform
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
     3
from lib_create_env import lib_generate_install_methods
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
system_str = platform.system()
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
     7
INSTALLS = [ #(key,method, option_str, dict_extra_env)
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
     8
    'LXML',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
     9
    'PSYCOPG2',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    10
    'PIL', 
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    11
    'DJANGO',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    12
    'DJANGO-EXTENSIONS',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    13
    'SOUTH',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    14
    'HTTPLIB2',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    15
    'HAYSTACK',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    16
    'WHOOSH',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    17
    'WIKITOOLS',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    18
    'ISODATE',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    19
    'RDFLIB',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    20
    'SPARQLWRAPPER',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    21
    'PYYAML',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    22
]
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    24
if system_str == 'Windows':
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    25
    INSTALLS.append('PYSTEMMER')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    27
if system_str == "Linux":
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    28
    INSTALLS.insert(2, 'DISTRIBUTE')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    30
OPTIONS_TO_ADD = ['clear', 'type_install=local', 'unzip_setuptools']
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    31
if system_str != 'Linux':
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    32
    OPTIONS_TO_ADD.append('use_distribute')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    35
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)