virtualenv/web/res/res_create_env.py
author cavaliet
Fri, 11 Jul 2014 16:49:14 +0200
changeset 292 f6742c41d7a3
parent 272 1c774f7a0341
child 295 af29252631ac
permissions -rw-r--r--
user form management with django registration
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',
292
f6742c41d7a3 user form management with django registration
cavaliet
parents: 272
diff changeset
    13
    'REGISTRATION',
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    14
    'SOUTH',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    15
    'HTTPLIB2',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    16
    'HAYSTACK',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    17
    'WHOOSH',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    18
    'WIKITOOLS',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    19
    'ISODATE',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    20
    'RDFLIB',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    21
    'SPARQLWRAPPER',
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    22
    'PYYAML',
271
8f77cf71ab02 commit the venv update (django and dependancies) in the good head
cavaliet
parents: 243
diff changeset
    23
    'REQUESTS',
8f77cf71ab02 commit the venv update (django and dependancies) in the good head
cavaliet
parents: 243
diff changeset
    24
    'PYELASTICSEARCH',
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    25
]
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 == 'Windows':
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    28
    INSTALLS.append('PYSTEMMER')
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
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
    31
    INSTALLS.insert(2, 'DISTRIBUTE')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    33
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
    34
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
    35
    OPTIONS_TO_ADD.append('use_distribute')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
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
    38
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)