- openerp_site_packages = opj('lib', 'python%s' % py_short_version, 'site-packages', 'openerp-server')
-
- for addon in find_addons():
- add_path = addon.replace('.', os.path.sep).replace('openerp-server', 'bin', 1)
- addon_path = opj('lib', 'python%s' % py_short_version, 'site-packages', add_path.replace('bin', 'openerp-server', 1))
- pathfiles = []
- for root, dirs, innerfiles in os.walk(add_path):
- innerfiles = filter(lambda file: os.path.splitext(file)[1] not in ('.pyc', '.py', '.pyd', '.pyo'), innerfiles)
- if innerfiles:
- pathfiles.extend(((opj(addon_path, root.replace('bin/addons/', '')), map(lambda file: opj(root, file), innerfiles)),))
- files.extend(pathfiles)
- return files
-
-check_modules()
-
-f = file('openerp-server','w')
-start_script = """#!/bin/sh\necho "OpenERP Setup - The content of this file is generated at the install stage\n" """
-f.write(start_script)
-f.close()
-
-class openerp_server_install(install):
- def run(self):
- # create startup script
- start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n" % (opj(self.install_libbase, "openerp-server"), sys.executable)
- # write script
- f = open('openerp-server', 'w')
- f.write(start_script)
- f.close()
- install.run(self)
-
-options = {
- "py2exe": {
- "compressed": 1,
- "optimize": 2,
- "packages": ["lxml", "lxml.builder", "lxml._elementpath", "lxml.etree",
- "lxml.objectify", "decimal", "xml", "xml.dom", "xml.xpath",
- "encodings","mx.DateTime","wizard","pychart","PIL", "pyparsing",
- "pydot","asyncore","asynchat", "reportlab", "vobject", "HTMLParser"],
- "excludes" : ["Tkconstants","Tkinter","tcl"],
- }
-}