119 #install jcc |
119 #install jcc |
120 |
120 |
121 #patch for linux |
121 #patch for linux |
122 if system_str == 'Linux' : |
122 if system_str == 'Linux' : |
123 olddir = os.getcwd() |
123 olddir = os.getcwd() |
124 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') |
124 setuptools_path = os.path.join(lib_dir, 'site-packages', 'setuptools') |
125 if os.path.isfile(patch_dest_path): |
125 if os.path.exists(setuptools_path) and os.path.isdir(setuptools_path): |
126 # must unzip egg |
126 patch_dest_path = os.path.join(lib_dir, 'site-packages') |
127 # rename file and etract all |
127 else: |
128 shutil.move(patch_dest_path, patch_dest_path + ".zip") |
128 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])) |
129 zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') |
129 if os.path.isfile(patch_dest_path): |
130 zf.extractall(patch_dest_path) |
130 # must unzip egg |
131 os.remove(patch_dest_path + ".zip") |
131 # rename file and etract all |
|
132 shutil.move(patch_dest_path, patch_dest_path + ".zip") |
|
133 zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') |
|
134 zf.extractall(patch_dest_path) |
|
135 os.remove(patch_dest_path + ".zip") |
132 logger.notify("Patch jcc : %s " % (patch_dest_path)) |
136 logger.notify("Patch jcc : %s " % (patch_dest_path)) |
133 os.chdir(patch_dest_path) |
137 os.chdir(patch_dest_path) |
134 p = patch.fromfile(os.path.join(jcc_src_path,"jcc","patches","patch.43.0.6c11")) |
138 p = patch.fromfile(os.path.join(jcc_src_path,"jcc","patches","patch.43.0.6c11")) |
135 p.apply() |
139 p.apply() |
136 os.chdir(olddir) |
140 os.chdir(olddir) |