virtualenv/web/res/res_create_env.py
author cavaliet
Tue, 17 Jun 2014 10:25:33 +0200
changeset 271 8f77cf71ab02
parent 243 1f2840354865
child 272 1c774f7a0341
permissions -rw-r--r--
commit the venv update (django and dependancies) in the good head
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',
271
8f77cf71ab02 commit the venv update (django and dependancies) in the good head
cavaliet
parents: 243
diff changeset
    10
    #'PIL', 
243
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',
271
8f77cf71ab02 commit the venv update (django and dependancies) in the good head
cavaliet
parents: 243
diff changeset
    22
    'REQUESTS',
8f77cf71ab02 commit the venv update (django and dependancies) in the good head
cavaliet
parents: 243
diff changeset
    23
    'PYELASTICSEARCH',
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    24
]
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    26
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
    27
    INSTALLS.append('PYSTEMMER')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    29
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
    30
    INSTALLS.insert(2, 'DISTRIBUTE')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
243
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 = ['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
    33
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
    34
    OPTIONS_TO_ADD.append('use_distribute')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
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
    37
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)