virtualenv/web/res/res_create_env.py
author ymh <ymh.work@gmail.com>
Tue, 27 Aug 2013 22:18:57 +0200
changeset 2 aaa8629d42c9
parent 0 81e7900b06a7
child 3 63c5437a9b7d
permissions -rw-r--r--
add django rest framework and its dependencies + improve virtualenv creation

import platform

from lib_create_env import lib_generate_install_methods

system_str = platform.system()


INSTALLS = [ #(key,method, option_str, dict_extra_env)
    'SIX',
    'WSGIREF',
    'REQUESTS',
    'SIMPLEJSON',
    'ISODATE',
    'PYPARSING',
    'HTML5LIB',
    'PSYCOPG2',
    'SOUTH',
    'DJANGO',
    'DJANGO-EXTENSIONS',
    'RDFLIB',
    'SPARQLWRAPPER',
    'DEFUSEDXML',
    'DJANGO-CORS-HEADERS',
    'DJANGO-FILTERS',
    'MARKDOWN',
    'DJANGO-REST-FRAMEWORK',    
]

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)