-included_addons = [
- 'account', 'account_followup', 'account_tax_include', 'airport', 'audittrail',
- 'base','base_partner_relation', 'base_setup', 'crm', 'custom', 'delivery',
- 'edi', 'esale_ez', 'esale_joomla', 'esale_osc',
- 'hr', 'hr_evaluation', 'hr_expense', 'hr_skill', 'hr_timesheet',
- 'hr_timesheet_ical', 'hr_timesheet_invoice', 'hr_timesheet_project',
- 'letter', 'marketing', 'mrp', 'network', 'partner_ldap',
- 'product','product_electronic', 'product_expiry', 'product_extended',
- 'productivity_analysis', 'product_variant', 'profile_accounting',
- 'profile_manufacturing', 'profile_service', 'project', 'purchase',
- 'purchase_tax_include', 'report_analytic_line', 'report_crm',
- 'report_project', 'report_purchase', 'report_sale', 'sale', 'sale_crm',
- 'sale_journal', 'sale_rebate', 'sale_tax_include', 'sandwich', 'scrum',
- 'stock', 'subscription', 'travel',
- 'l10n_be', 'l10n_ca-qc', 'l10n_ch', 'l10n_ch_pcpbl_association',
- 'l10n_ch_pcpbl_independant', 'l10n_ch_pcpbl_menage',
- 'l10n_ch_pcpbl_plangen', 'l10n_ch_pcpbl_plangensimpl', 'l10n_ch_vat_brut',
- 'l10n_ch_vat_forfait', 'l10n_ch_vat_net', 'l10n_fr', 'l10n_se',
- 'l10n_simple', 'l10n_chart_at', 'l10n_chart_au', 'l10n_chart_be_frnl',
- 'l10n_chart_br', 'l10n_chart_ca_en', 'l10n_chart_ca_fr',
- 'l10n_chart_ch_german', 'l10n_chart_cn', 'l10n_chart_cn_traditional',
- 'l10n_chart_co', 'l10n_chart_cz', 'l10n_chart_da', 'l10n_chart_de_skr03',
- 'l10n_chart_hu', 'l10n_chart_id', 'l10n_chart_it', 'l10n_chart_it_cc2424',
- 'l10n_chart_la', 'l10n_chart_nl', 'l10n_chart_nl_standard', 'l10n_chart_no',
- 'l10n_chart_pa', 'l10n_chart_pl', 'l10n_chart_sp', 'l10n_chart_sw',
- 'l10n_chart_sw_church', 'l10n_chart_sw_food', 'l10n_chart_uk',
- 'l10n_chart_us_general', 'l10n_chart_us_manufacturing',
- 'l10n_chart_us_service', 'l10n_chart_us_ucoa', 'l10n_chart_us_ucoa_ez',
- 'l10n_chart_ve',]
-
-required_modules = [('psycopg', 'PostgreSQL module'),
- ('xml', 'XML Tools for python'),
- ('libxml2', 'libxml2 python bindings'),
- ('libxslt', 'libxslt python bindings')]
-
-def check_modules():
- ok = True
- for modname, desc in required_modules:
- try:
- exec('import %s' % modname)
- except ImportError:
- ok = False
- print 'Error: python module %s (%s) is required' % (modname, desc)
-
- if not ok:
- sys.exit(1)
+# backports os.walk with followlinks from python 2.6
+def walk_followlinks(top, topdown=True, onerror=None, followlinks=False):
+ from os.path import join, isdir, islink
+ from os import listdir, error
+
+ try:
+ names = listdir(top)
+ except error, err:
+ if onerror is not None:
+ onerror(err)
+ return
+
+ dirs, nondirs = [], []
+ for name in names:
+ if isdir(join(top, name)):
+ dirs.append(name)
+ else:
+ nondirs.append(name)
+
+ if topdown:
+ yield top, dirs, nondirs
+ for name in dirs:
+ path = join(top, name)
+ if followlinks or not islink(path):
+ for x in walk_followlinks(path, topdown, onerror, followlinks):
+ yield x
+ if not topdown:
+ yield top, dirs, nondirs
+
+if sys.version_info < (2, 6):
+ os.walk = walk_followlinks