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') |
|
138 if os.path.isfile(patch_dest_path): |
137 if os.path.isfile(patch_dest_path): |
139 # must unzip egg |
138 # must unzip egg |
140 # rename file and etract all |
139 # rename file and etract all |
141 shutil.move(patch_dest_path, patch_dest_path + ".zip") |
140 shutil.move(patch_dest_path, patch_dest_path + ".zip") |
142 zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') |
141 zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') |
143 zf.extractall(patch_dest_path) |
142 zf.extractall(patch_dest_path) |
144 os.remove(patch_dest_path + ".zip") |
143 os.remove(patch_dest_path + ".zip") |
145 logger.notify("Patch jcc : %s " % (patch_dest_path)) |
144 logger.notify("Patch jcc : %s " % (patch_dest_path)) |
146 os.chdir(patch_dest_path) |
145 os.chdir(patch_dest_path) |
147 p = patch.fromfile(os.path.join(jcc_src_path,"jcc","patches","patch.3.6")) |
146 p = patch.fromfile(os.path.join(jcc_src_path,"jcc","patches","patch.43.0.6c11")) |
148 p.apply() |
147 p.apply() |
149 os.chdir(olddir) |
148 os.chdir(olddir) |
150 |
149 |
151 logger.notify("Install jcc") |
150 logger.notify("Install jcc") |
152 call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'python')), 'setup.py', 'install'], |
151 call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'python')), 'setup.py', 'install'], |
153 cwd=jcc_src_path, |
152 cwd=jcc_src_path, |
154 filter_stdout=filter_python_develop, |
153 filter_stdout=filter_python_develop, |
155 show_stdout=True) |
154 show_stdout=True, |
|
155 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-7-openjdk-i386/'}) |
156 #install pylucene |
156 #install pylucene |
157 |
157 |
158 logger.notify("Install pylucene") |
158 logger.notify("Install pylucene") |
159 #modify makefile |
159 #modify makefile |
160 makefile_path = os.path.join(pylucene_src_path,"Makefile") |
160 makefile_path = os.path.join(pylucene_src_path,"Makefile") |
190 |
190 |
191 logger.notify("pylucene make") |
191 logger.notify("pylucene make") |
192 call_subprocess(['make'], |
192 call_subprocess(['make'], |
193 cwd=os.path.abspath(pylucene_src_path), |
193 cwd=os.path.abspath(pylucene_src_path), |
194 filter_stdout=filter_python_develop, |
194 filter_stdout=filter_python_develop, |
195 show_stdout=True) |
195 show_stdout=True, |
|
196 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-7-openjdk-i386/'}) |
196 |
197 |
197 logger.notify("pylucene make install") |
198 logger.notify("pylucene make install") |
198 call_subprocess(['make', 'install'], |
199 call_subprocess(['make', 'install'], |
199 cwd=os.path.abspath(pylucene_src_path), |
200 cwd=os.path.abspath(pylucene_src_path), |
200 filter_stdout=filter_python_develop, |
201 filter_stdout=filter_python_develop, |
201 show_stdout=True) |
202 show_stdout=True, |
|
203 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-7-openjdk-i386/'}) |
202 |
204 |
203 |
205 |
204 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): |
206 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): |
205 psycopg2_src = os.path.join(src_dir,"psycopg2.zip") |
207 psycopg2_src = os.path.join(src_dir,"psycopg2.zip") |
206 shutil.copy(res_env.URLS['PSYCOPG2'][res_source_key], psycopg2_src) |
208 shutil.copy(res_env.URLS['PSYCOPG2'][res_source_key], psycopg2_src) |