virtualenv/res/lib/lib_create_env.py
changeset 81 c6f9843db895
parent 70 eccd6fa65f06
child 83 b7aef101c7d1
equal deleted inserted replaced
80:c1de7aaab6ce 81:c6f9843db895
    97 
    97 
    98 def adjust_options(options, args):
    98 def adjust_options(options, args):
    99     pass
    99     pass
   100 
   100 
   101 
   101 
   102 def install_pylucene(option_str, extra_env, res_source_key, home_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop):
   102 def install_pylucene(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop):
   103     
   103     
   104     logger.notify("Get Pylucene from %s " % res_env.URLS['PYLUCENE'][res_source_key])
   104     logger.notify("Get Pylucene from %s " % res_env.URLS['PYLUCENE'][res_source_key])
   105     pylucene_src = os.path.join(src_dir,"pylucene.tar.gz")
   105     pylucene_src = os.path.join(src_dir,"pylucene.tar.gz")
   106     if res_source_key == 'local':
   106     if res_source_key == 'local':
   107         shutil.copy(res_env.URLS['PYLUCENE'][res_source_key], pylucene_src)
   107         shutil.copy(res_env.URLS['PYLUCENE'][res_source_key], pylucene_src)
   186                     cwd=os.path.abspath(pylucene_src_path),
   186                     cwd=os.path.abspath(pylucene_src_path),
   187                     filter_stdout=filter_python_develop,
   187                     filter_stdout=filter_python_develop,
   188                     show_stdout=True)
   188                     show_stdout=True)
   189     
   189     
   190 
   190 
   191 def install_psycopg2(option_str, extra_env, res_source_key, home_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop):
   191 def install_psycopg2(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop):
   192     psycopg2_src = os.path.join(src_dir,"psycopg2.zip")
   192     psycopg2_src = os.path.join(src_dir,"psycopg2.zip")
   193     shutil.copy(res_env.URLS['PSYCOPG2'][res_source_key], psycopg2_src)
   193     shutil.copy(res_env.URLS['PSYCOPG2'][res_source_key], psycopg2_src)
   194     #extract psycopg2
   194     #extract psycopg2
   195     zf = zipfile.ZipFile(psycopg2_src)
   195     zf = zipfile.ZipFile(psycopg2_src)
   196     psycopg2_base_path = os.path.join(src_dir,"psycopg2")
   196     psycopg2_base_path = os.path.join(src_dir,"psycopg2")
   276         logger.indent += 2
   276         logger.indent += 2
   277         try:    
   277         try:    
   278             for key, method, option_str, extra_env in res_env.NORMAL_INSTALL:
   278             for key, method, option_str, extra_env in res_env.NORMAL_INSTALL:
   279                 if key not in ignore_packages:
   279                 if key not in ignore_packages:
   280                     if callable(method):
   280                     if callable(method):
   281                         method(option_str, extra_env, res_source_key, home_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop)
   281                         method(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop)
   282                     else:
   282                     else:
   283                         normal_install(key, method, option_str, extra_env, res_source_key, home_dir, tmp_dir, res_env, logger, call_subprocess)
   283                         normal_install(key, method, option_str, extra_env, res_source_key, home_dir, tmp_dir, res_env, logger, call_subprocess)
   284                             
   284                             
   285             logger.notify("Clear source dir")
   285             logger.notify("Clear source dir")
   286             shutil.rmtree(src_dir)
   286             shutil.rmtree(src_dir)