<s> import ConfigParser <EOL> import os <EOL> import sys <EOL> import install_venv_common as install_venv <EOL> def print_help ( project , venv , root ) : <EOL> help = """<STR_LIT>""" <EOL> print ( help % dict ( project = project , venv = venv , root = root ) ) <EOL> def main ( argv ) : <EOL> root = os . path . dirname ( os . path . dirname ( os . path . realpath ( __file__ ) ) ) <EOL> if os . environ . get ( '<STR_LIT>' ) : <EOL> root = os . environ [ '<STR_LIT>' ] <EOL> venv = os . path . join ( root , '<STR_LIT>' ) <EOL> if os . environ . get ( '<STR_LIT>' ) : <EOL> venv = os . environ [ '<STR_LIT>' ] <EOL> pip_requires = os . path . join ( root , '<STR_LIT>' ) <EOL> test_requires = os . path . join ( root , '<STR_LIT>' ) <EOL> py_version = "<STR_LIT>" % ( sys . version_info [ <NUM_LIT:0> ] , sys . version_info [ <NUM_LIT:1> ] ) <EOL> setup_cfg = ConfigParser . ConfigParser ( ) <EOL> setup_cfg . read ( '<STR_LIT>' ) <EOL> project = setup_cfg . get ( '<STR_LIT>' , '<STR_LIT:name>' ) <EOL> install = install_venv . InstallVenv ( <EOL> root , venv , pip_requires , test_requires , py_version , project ) <EOL> options = install . parse_args ( argv ) <EOL> install . check_python_version ( ) <EOL> install . check_dependencies ( ) <EOL> install . create_virtualenv ( no_site_packages = options . no_site_packages ) <EOL> install . install_dependencies ( ) <EOL> print_help ( project , venv , root ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( sys . argv ) </s>
