131 olddir = os.getcwd() |
131 olddir = os.getcwd() |
132 setuptools_path = os.path.join(lib_dir, 'site-packages', 'setuptools') |
132 setuptools_path = os.path.join(lib_dir, 'site-packages', 'setuptools') |
133 if os.path.exists(setuptools_path) and os.path.isdir(setuptools_path): |
133 if os.path.exists(setuptools_path) and os.path.isdir(setuptools_path): |
134 patch_dest_path = os.path.join(lib_dir, 'site-packages') |
134 patch_dest_path = os.path.join(lib_dir, 'site-packages') |
135 else: |
135 else: |
136 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])) |
136 #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])) |
|
137 patch_dest_path = os.path.join(lib_dir,'site-packages','setuptools') |
137 if os.path.isfile(patch_dest_path): |
138 if os.path.isfile(patch_dest_path): |
138 # must unzip egg |
139 # must unzip egg |
139 # rename file and etract all |
140 # rename file and etract all |
140 shutil.move(patch_dest_path, patch_dest_path + ".zip") |
141 shutil.move(patch_dest_path, patch_dest_path + ".zip") |
141 zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') |
142 zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') |
142 zf.extractall(patch_dest_path) |
143 zf.extractall(patch_dest_path) |
143 os.remove(patch_dest_path + ".zip") |
144 os.remove(patch_dest_path + ".zip") |
144 logger.notify("Patch jcc : %s " % (patch_dest_path)) |
145 logger.notify("Patch jcc : %s " % (patch_dest_path)) |
145 os.chdir(patch_dest_path) |
146 os.chdir(patch_dest_path) |
146 p = patch.fromfile(os.path.join(jcc_src_path,"jcc","patches","patch.43.0.6c11")) |
147 p = patch.fromfile(os.path.join(jcc_src_path,"jcc","patches","patch.3.6")) |
147 p.apply() |
148 p.apply() |
148 os.chdir(olddir) |
149 os.chdir(olddir) |
149 |
150 |
150 logger.notify("Install jcc") |
151 logger.notify("Install jcc") |
151 call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'python')), 'setup.py', 'install'], |
152 call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'python')), 'setup.py', 'install'], |