#!/bin/sh
# @function install psutil
function InstallPythonExtPSUtil()
{
    ShowResult "[green]正在安装Python-PSUtil库... [/green]" 1
    
    # install
    eval cd ${_PATH_COMPILATION_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval python ${_PATH_SOFTWARE_}/get-pip.py ${_SYS_SHOW_INSTALL_DETAILS_}
    eval pip install psutil ${_SYS_SHOW_INSTALL_DETAILS_}
    
    ShowStatus $?
}

# @function install psutil by source code
function InstallPythonExtPSUtilBySrc()
{
	ShowResult "[green]正在安装Python-PSUtil库... [/green]" 1
    
    # install
    eval cd ${_PATH_COMPILATION_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval rm -rf ./psutil-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval tar zxvf ${_PATH_SOFTWARE_}/psutil-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval cd psutil-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval python setup.py install ${_SYS_SHOW_INSTALL_DETAILS_}

    ShowStatus $?
}

# @function install pip by source code
function InstallPythonExtPipBySrc()
{
	ShowResult "[green]正在安装Python-Pip库... [/green]" 1
    
    # install
    eval cd ${_PATH_COMPILATION_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval rm -rf ./pip-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval tar zxvf ${_PATH_SOFTWARE_}/pip-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval cd pip-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval python setup.py install ${_SYS_SHOW_INSTALL_DETAILS_}
    
    ShowStatus $?
}

# @function install setuptools by source code
function InstallPythonExtSetupToolsBySrc()
{
	ShowResult "[green]正在安装Python-SetupTools库... [/green]" 1
    
    # install
    eval cd ${_PATH_COMPILATION_} ${_SYS_SHOW_INSTALL_DETAILS_}
    eval rm -rf ./setuptools-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval tar zxvf ${_PATH_SOFTWARE_}/setuptools-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval cd setuptools-* ${_SYS_SHOW_INSTALL_DETAILS_}
    eval python setup.py install ${_SYS_SHOW_INSTALL_DETAILS_}
    
    ShowStatus $?
}