virtualenv/web/res/res_create_env.py
author cavaliet
Thu, 17 Jul 2014 15:39:28 +0200
changeset 295 af29252631ac
parent 292 f6742c41d7a3
child 345 7bc38c7d6cf9
permissions -rw-r--r--
renkan object with thumbnail
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',
295
af29252631ac renkan object with thumbnail
cavaliet
parents: 292
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',
295
af29252631ac renkan object with thumbnail
cavaliet
parents: 292
diff changeset
    25
    'EASYTHUMBNAIL',
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    26
]
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
243
1f2840354865 correct filter on tag completion to avoid tags that are not translated
ymh <ymh.work@gmail.com>
parents: 229
diff changeset
    28
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
    29
    INSTALLS.append('PYSTEMMER')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
243
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
    INSTALLS.insert(2, 'DISTRIBUTE')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
243
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 = ['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
    35
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
    36
    OPTIONS_TO_ADD.append('use_distribute')
0
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
896db0083b76 first commit
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
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
    39
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)