198 show_stdout=True) |
198 show_stdout=True) |
199 |
199 |
200 if system_str == 'Linux' and 'DISTRIBUTE' not in ignore_packages: |
200 if system_str == 'Linux' and 'DISTRIBUTE' not in ignore_packages: |
201 normal_install('DISTRIBUTE', 'pip', None, None, res_source_key, home_dir, tmp_dir) |
201 normal_install('DISTRIBUTE', 'pip', None, None, res_source_key, home_dir, tmp_dir) |
202 |
202 |
203 if 'PYXML' not in ignore_packages: |
|
204 logger.notify("PyXML install : %s " % URLS['PYXML'][res_source_key]) |
|
205 if sys.version_info >= (2,6): |
|
206 logger.notify("PyXML -> python version >= 2.6 : patching") |
|
207 pyxml_src = os.path.join(src_dir,"pyxml.tar.gz") |
|
208 urllib.urlretrieve(URLS['PYXML'][res_source_key], pyxml_src) |
|
209 logger.notify("PyXML -> python version >= 2.6 : extract archive") |
|
210 tf = tarfile.open(pyxml_src,'r:gz') |
|
211 pyxml_base_path = os.path.join(src_dir,"pyxml") |
|
212 tf.extractall(pyxml_base_path) |
|
213 tf.close() |
|
214 |
|
215 #patch |
|
216 pyxml_version = os.listdir(pyxml_base_path)[0] |
|
217 pyxml_path = os.path.join(pyxml_base_path, pyxml_version) |
|
218 olddir = os.getcwd() |
|
219 os.chdir(pyxml_path) |
|
220 logger.notify("PyXML -> python version >= 2.6 : do patch %s : %s " % (pyxml_path, URLS['PYXML']['patch'])) |
|
221 p = patch.fromfile(URLS['PYXML']['patch']) |
|
222 p.apply() |
|
223 os.chdir(olddir) |
|
224 logger.notify("PyXML -> python version >= 2.6 : install") |
|
225 call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'pip')), 'install', '-E', os.path.abspath(home_dir), '--build='+os.path.abspath(pyxml_base_path), '--no-download', pyxml_version], |
|
226 cwd=os.path.abspath(tmp_dir), |
|
227 filter_stdout=filter_python_develop, |
|
228 show_stdout=True) |
|
229 else: |
|
230 call_subprocess([os.path.abspath(os.path.join(home_dir, 'bin', 'pip')), 'install', '-E', os.path.abspath(home_dir), URLS['PYXML'][res_source_key]], |
|
231 cwd=os.path.abspath(tmp_dir), |
|
232 filter_stdout=filter_python_develop, |
|
233 show_stdout=True) |
|
234 |
|
235 |
|
236 NORMAL_INSTALL = [ #(key,method, option_str, extra_env) |
203 NORMAL_INSTALL = [ #(key,method, option_str, extra_env) |
237 #('LXML', 'easy_install', None, {'STATIC_DEPS': 'true'}), |
204 #('LXML', 'easy_install', None, {'STATIC_DEPS': 'true'}), |
238 ('PSYCOPG2', 'pip', None, None), |
205 ('PSYCOPG2', 'pip', None, None), |
239 ('MYSQL', 'pip', None, None), |
206 ('MYSQL', 'pip', None, None), |
240 ('PIL', 'pip', None, None), |
207 ('PIL', 'pip', None, None), |
241 ('FOURSUITE_XML','easy_install', None, None), |
|
242 ('DJANGO','pip', None, None), |
208 ('DJANGO','pip', None, None), |
243 ('JOGGING','pip', None, None), |
209 ('JOGGING','pip', None, None), |
244 ('DJANGO-EXTENSIONS', 'pip', None, None), |
210 ('DJANGO-EXTENSIONS', 'pip', None, None), |
245 ('DJANGO-REGISTRATION', 'easy_install', '-Z', None), |
211 ('DJANGO-REGISTRATION', 'easy_install', '-Z', None), |
246 ('DJANGO-TAGGING', 'pip', None, None), |
212 ('DJANGO-TAGGING', 'pip', None, None), |