import platform

from lib_create_env import lib_generate_install_methods

system_str = platform.system()


INSTALLS = [ #(key,method, option_str, dict_extra_env)
    'PSYCOPG2',
    'PIL',
    'DJANGO',
    'SOUTH',
    'DJANGO-EXTENSIONS',
    'DJANGO-REGISTRATION',
    'SORL_THUMBNAIL',
    'HAYSTACK',
    'REQUESTS',
    'SIMPLEJSON',
    'PYELASTICSEARCH',
    'WHOOSH',
    'MIMEPARSE',
    'SIX',
    'PYTZ',
    'PYTHON-DATEUTIL',
    'PYYAML',
    'PYTHON-DIGEST',
    'DJANGO-TASTYPIE',
    'ISODATE',
    'HTML5LIB',
    'RDFLIB',
]

#if system_str == "Linux" and 'PIL' in INSTALLS:
#    i = INSTALLS.index('PIL')
#    INSTALLS.insert(i, 'ZLIB')
#    INSTALLS.insert(i, 'LIBJPEG')

if system_str == "Linux":
    INSTALLS.insert(2, 'DISTRIBUTE')

OPTIONS_TO_ADD = ['clear', 'type_install=local', 'unzip_setuptools']
if system_str != 'Linux':
    OPTIONS_TO_ADD.append('use_distribute')

def generate_install_methods(path_locations, src_base, Logger, call_subprocess):    
    return lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, INSTALLS, OPTIONS_TO_ADD)
