- import py2exe
- py2exe_keywords['console'] = [
- { "script": "openerp-server",
- "icon_resources": [(1, join("pixmaps","openerp-icon.ico"))],
- }]
- py2exe_keywords['options'] = {
- "py2exe": {
- "skip_archive": 1,
- "optimize": 2,
- "dist_dir": 'dist',
- "packages": [
- "lxml", "lxml.builder", "lxml._elementpath", "lxml.etree",
- "lxml.objectify", "decimal", "xml", "xml", "xml.dom", "xml.xpath",
- "encodings", "dateutil", "pychart", "PIL", "pyparsing",
- "pydot", "asyncore","asynchat", "reportlab", "vobject",
- "HTMLParser", "select", "mako", "poplib",
- "imaplib", "smtplib", "email", "yaml", "DAV",
- "uuid", "commands", "openerp", # TODO is it necessary to include cgitb?
- ],
- "excludes" : ["Tkconstants","Tkinter","tcl"],
- }
- }
- # TODO is it still necessary now that we don't use the library.zip file?
- def data_files():
- '''For Windows, we consider all the addons as data files.
- It seems also that package_data below isn't honored by py2exe.'''
- files = []
- os.chdir('openerp')
- for (dp, dn, names) in os.walk('addons'):
- files.append((join('openerp',dp), map(lambda x: join('openerp', dp, x), names)))
- os.chdir('..')
- files.append(('openerp', [join('openerp', 'import_xml.rng'),]))
-
- # copy pytz/timzeone
- # TODO check if we have to also copy dateutil's timezone data.
- import pytz
- # Make sure the layout of pytz hasn't changed
- assert (pytz.__file__.endswith('__init__.pyc') or
- pytz.__file__.endswith('__init__.py')), pytz.__file__
- pytz_dir = os.path.dirname(pytz.__file__)