# HG changeset patch # User ymh # Date 1304419857 -7200 # Node ID 89cfc2de7f5e73d174ade572c0e0955944277e9c # Parent 1396aaf1a51c77227ffbb648d46da184706a1cf6 correct virtualenv creation diff -r 1396aaf1a51c -r 89cfc2de7f5e virtualenv/res/lib/lib_create_env.py --- a/virtualenv/res/lib/lib_create_env.py Tue May 03 00:02:45 2011 +0200 +++ b/virtualenv/res/lib/lib_create_env.py Tue May 03 12:50:57 2011 +0200 @@ -124,14 +124,18 @@ #patch for linux if system_str == 'Linux' : olddir = os.getcwd() - patch_dest_path = os.path.join(lib_dir,'site-packages','setuptools-0.6c11-py'+'%s.%s' % (sys.version_info[0], sys.version_info[1])+'.egg') - if os.path.isfile(patch_dest_path): - # must unzip egg - # rename file and etract all - shutil.move(patch_dest_path, patch_dest_path + ".zip") - zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') - zf.extractall(patch_dest_path) - os.remove(patch_dest_path + ".zip") + setuptools_path = os.path.join(lib_dir, 'site-packages', 'setuptools') + if os.path.exists(setuptools_path) and os.path.isdir(setuptools_path): + patch_dest_path = os.path.join(lib_dir, 'site-packages') + else: + patch_dest_path = os.path.join(lib_dir,'site-packages','setuptools-0.6c11-py%s.%s.egg' % (sys.version_info[0], sys.version_info[1])) + if os.path.isfile(patch_dest_path): + # must unzip egg + # rename file and etract all + shutil.move(patch_dest_path, patch_dest_path + ".zip") + zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') + zf.extractall(patch_dest_path) + os.remove(patch_dest_path + ".zip") logger.notify("Patch jcc : %s " % (patch_dest_path)) os.chdir(patch_dest_path) p = patch.fromfile(os.path.join(jcc_src_path,"jcc","patches","patch.43.0.6c11")) @@ -201,8 +205,8 @@ zf.close() psycopg2_src_path = os.path.join(psycopg2_base_path, os.listdir(psycopg2_base_path)[0]) - shutil.copytree(os.path.join(psycopg2_src_path, 'psycopg2'), os.path.abspath(os.path.join(home_dir, 'Lib', 'psycopg2'))) - shutil.copy(os.path.join(psycopg2_src_path, 'psycopg2-2.0.10-py2.6.egg-info'), os.path.abspath(os.path.join(home_dir, 'Lib', 'site-packages'))) + shutil.copytree(os.path.join(psycopg2_src_path, 'psycopg2'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages', 'psycopg2'))) + shutil.copy(os.path.join(psycopg2_src_path, 'psycopg2-2.0.14-py2.6.egg-info'), os.path.abspath(os.path.join(home_dir, 'Lib/site-packages', 'site-packages'))) diff -r 1396aaf1a51c -r 89cfc2de7f5e virtualenv/res/src/psycopg2-2.0.10.win32-py2.6-pg8.3.7-release.zip Binary file virtualenv/res/src/psycopg2-2.0.10.win32-py2.6-pg8.3.7-release.zip has changed