49 'LXML': {'setup': 'lxml', 'url': 'http://pypi.python.org/packages/2.6/l/lxml/lxml-2.2.2-py2.6-win32.egg', 'local':"lxml-2.2.2-py2.6-win32.egg"} |
49 'LXML': {'setup': 'lxml', 'url': 'http://pypi.python.org/packages/2.6/l/lxml/lxml-2.2.2-py2.6-win32.egg', 'local':"lxml-2.2.2-py2.6-win32.egg"} |
50 }) |
50 }) |
51 else: |
51 else: |
52 URLS.update({ |
52 URLS.update({ |
53 'PSYCOPG2': {'setup': 'psycopg2','url': 'http://initd.org/psycopg/tarballs/PSYCOPG-2-8/psycopg2-2.8.4.tar.gz', 'local':"psycopg2-2.8.4.tar.gz"}, |
53 'PSYCOPG2': {'setup': 'psycopg2','url': 'http://initd.org/psycopg/tarballs/PSYCOPG-2-8/psycopg2-2.8.4.tar.gz', 'local':"psycopg2-2.8.4.tar.gz"}, |
54 'PYLUCENE': {'setup': 'pylucene', 'url': 'http://mirrors.ircam.fr/pub/apache/lucene/pylucene/pylucene-3.6.0-2-src.tar.gz', 'local':"pylucene-3.6.0-2-src.tar.gz"}, |
54 'PYLUCENE': {'setup': 'pylucene', 'url': 'https://www-eu.apache.org/dist/lucene/pylucene/pylucene-8.1.1-src.tar.gz', 'local':"pylucene-8.1.1-src.tar.gz"}, |
55 'PIL': {'setup': 'pil', 'url': 'http://effbot.org/downloads/Imaging-1.1.7.tar.gz', 'local':"Imaging-1.1.7.tar.gz"}, |
55 'PIL': {'setup': 'pil', 'url': 'http://effbot.org/downloads/Imaging-1.1.7.tar.gz', 'local':"Imaging-1.1.7.tar.gz"}, |
56 'LXML': {'setup': 'lxml', 'url':"lxml-4.4.2.tar.gz", 'local':"lxml-4.4.2.tar.gz"} |
56 'LXML': {'setup': 'lxml', 'url':"lxml-4.4.2.tar.gz", 'local':"lxml-4.4.2.tar.gz"} |
57 }) |
57 }) |
58 |
58 |
59 |
59 |
140 # rename file and etract all |
140 # rename file and etract all |
141 shutil.move(patch_dest_path, patch_dest_path + ".zip") |
141 shutil.move(patch_dest_path, patch_dest_path + ".zip") |
142 zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') |
142 zf = zipfile.ZipFile(patch_dest_path + ".zip",'r') |
143 zf.extractall(patch_dest_path) |
143 zf.extractall(patch_dest_path) |
144 os.remove(patch_dest_path + ".zip") |
144 os.remove(patch_dest_path + ".zip") |
145 logger.notify("Patch jcc : %s " % (patch_dest_path)) |
145 # logger.notify("Patch jcc : %s " % (patch_dest_path)) |
146 os.chdir(patch_dest_path) |
146 # os.chdir(patch_dest_path) |
147 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.43.0.6c11")) |
148 p.apply() |
148 # p.apply() |
149 os.chdir(olddir) |
149 # os.chdir(olddir) |
150 |
150 |
151 logger.notify("Install jcc") |
151 logger.notify("Install jcc") |
152 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'], |
153 cwd=jcc_src_path, |
153 cwd=jcc_src_path, |
154 filter_stdout=filter_python_develop, |
154 filter_stdout=filter_python_develop, |
155 show_stdout=True, |
155 show_stdout=True, |
156 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-7-oracle/'}) |
156 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-11-openjdk-i386/'}) |
157 #install pylucene |
157 #install pylucene |
158 |
158 |
159 logger.notify("Install pylucene") |
159 logger.notify("Install pylucene") |
160 #modify makefile |
160 #modify makefile |
161 makefile_path = os.path.join(pylucene_src_path,"Makefile") |
161 makefile_path = os.path.join(pylucene_src_path,"Makefile") |
192 logger.notify("pylucene make") |
192 logger.notify("pylucene make") |
193 call_subprocess(['make'], |
193 call_subprocess(['make'], |
194 cwd=os.path.abspath(pylucene_src_path), |
194 cwd=os.path.abspath(pylucene_src_path), |
195 filter_stdout=filter_python_develop, |
195 filter_stdout=filter_python_develop, |
196 show_stdout=True, |
196 show_stdout=True, |
197 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-7-oracle/'}) |
197 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-11-openjdk-i386/'}) |
198 |
198 |
199 logger.notify("pylucene make install") |
199 logger.notify("pylucene make install") |
200 call_subprocess(['make', 'install'], |
200 call_subprocess(['make', 'install'], |
201 cwd=os.path.abspath(pylucene_src_path), |
201 cwd=os.path.abspath(pylucene_src_path), |
202 filter_stdout=filter_python_develop, |
202 filter_stdout=filter_python_develop, |
203 show_stdout=True, |
203 show_stdout=True, |
204 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-7-oracle/'}) |
204 extra_env={'JCC_JDK' : '/usr/lib/jvm/java-11-openjdk-i386/'}) |
205 |
205 |
206 |
206 |
207 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): |
207 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): |
208 psycopg2_src = os.path.join(src_dir,"psycopg2.zip") |
208 psycopg2_src = os.path.join(src_dir,"psycopg2.zip") |
209 shutil.copy(res_env.URLS['PSYCOPG2'][res_source_key], psycopg2_src) |
209 shutil.copy(res_env.URLS['PSYCOPG2'][res_source_key], psycopg2_src) |