virtualenv/web/res/res_create_env.py
author ymh <ymh.work@gmail.com>
Mon, 27 Jan 2020 12:17:36 +0100
changeset 108 717966c8d4b8
parent 93 7b6bcc33783f
permissions -rw-r--r--
Use openjdk 8 for lucene
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
import platform
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
from lib_create_env import lib_generate_install_methods, install_pylucene, install_psycopg2
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
system_str = platform.system()
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
if system_str == 'Windows':
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
    INSTALLS = [
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
    ('JCC','easy_install',None,None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
    ('PSYCOPG2',install_psycopg2,None,None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
    ('PYLUCENE','easy_install',None,None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
    ]
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
else:
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
    INSTALLS = [
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
    ('PYLUCENE',install_pylucene,None,None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
    ('PSYCOPG2', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
    ]
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
if system_str == 'Linux':
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
    INSTALLS.extend([
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
    ('DISTRIBUTE', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
    ])
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
INSTALLS.extend([ #(key,method, option_str, dict_extra_env)
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
    ('SOUTH', 'pip', None, None),
93
7b6bcc33783f Add setuptools_hg to be installed
ymh <ymh.work@gmail.com>
parents: 76
diff changeset
    26
    ('PIL', 'easy_install', None, None),
16
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    ('DJANGO','pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
    ('DJANGO-EXTENSIONS', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
    ('DJANGO-REGISTRATION', 'easy_install', '-Z', None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
    ('DJANGO-TAGGING', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
    ('DJANGO-PISTON', 'easy_install', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
    ('HTTPLIB2', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
    ('OAUTH2', 'easy_install', None, None),
93
7b6bcc33783f Add setuptools_hg to be installed
ymh <ymh.work@gmail.com>
parents: 76
diff changeset
    34
    ('SETUPTOOLS-HG', 'pip', None, None),
16
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
    ('DJANGO-OAUTH-PLUS', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
    ('OPENID', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
    ('DJANGO_OPENID_CONSUMER', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
    ('SOCIAL_AUTH', 'easy_install', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
    ('DJANGO_GUARDIAN', 'pip', None, None),
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
    ('SORL_THUMBNAIL', 'pip', None, None),
64
3249b8cd0028 add a version of ldt platform for publishing
ymh <ymh.work@gmail.com>
parents: 48
diff changeset
    41
    ('LDT', 'pip', None, None),
16
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
])
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
if system_str == "Darwin":
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
    INSTALLS.extend([
48
b888750b6ae5 add pytz to the list of lib to install in virtualenv
ymh <ymh.work@gmail.com>
parents: 16
diff changeset
    46
    ('LXML', 'easy_install', None, {'STATIC_DEPS': 'true', 'LIBXML2_VERSION': '2.7.8', 'LIBXSLT_VERSION': '1.1.26', 'LIBICONV_VERSION': '1.13.1'}),
16
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
    ])
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
else:
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
    INSTALLS.extend([
108
717966c8d4b8 Use openjdk 8 for lucene
ymh <ymh.work@gmail.com>
parents: 93
diff changeset
    50
    ('LXML', 'pip', None, None),
16
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
    ])
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
93
7b6bcc33783f Add setuptools_hg to be installed
ymh <ymh.work@gmail.com>
parents: 76
diff changeset
    54
def generate_install_methods(path_locations, src_base, Logger, call_subprocess):
16
e37a29d23c86 First version of tralalere platform
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS)