def make_env(*packages):
 if (not os.path.exists(env_root)):
  os.makedirs(env_root)
 env = os.path.join(env_root, os.path.basename(py_exe))
 py = pjoin(env, 'bin', 'python')
 if (not os.path.exists(py)):
  run('python -m virtualenv {} -p {}'.format(pipes.quote(env), pipes.quote(py_exe)))
  py = pjoin(env, 'bin', 'python')
  run([py, '-V'])
  install(py, 'pip', 'setuptools')
 if packages:
  install(py, *packages)
 return py

def make_env ( * packages ) : if ( not os . path . exists ( env_root ) ) : os . makedirs ( env_root ) env = os . path . join ( env_root , os . path . basename ( py_exe ) ) py = pjoin ( env , 'bin' , 'python' ) if ( not os . path . exists ( py ) ) : run ( 'python -m virtualenv {} -p {}' . format ( pipes . quote ( env ) , pipes . quote ( py_exe ) ) ) py = pjoin ( env , 'bin' , 'python' ) run ( [ py , '-V' ] ) install ( py , 'pip' , 'setuptools' ) if packages : install ( py , * packages ) return py
make a virtualenv assumes which python has the virtualenv package .