2 # -*- coding: utf-8 -*-
7 from setuptools import find_packages, setup
8 from os.path import join, dirname
11 execfile(join(dirname(__file__), 'openerp', 'release.py')) # Load release variables
15 def py2exe_datafiles():
17 data_files['Microsoft.VC90.CRT'] = glob('C:\Microsoft.VC90.CRT\*.*')
19 for root, dirnames, filenames in os.walk('openerp'):
20 for filename in filenames:
21 if not re.match(r'.*(\.pyc|\.pyo|\~)$', filename):
22 data_files.setdefault(root, []).append(join(root, filename))
25 data_files['babel/localedata'] = glob(join(dirname(babel.__file__), 'localedata', '*'))
26 others = ['global.dat', 'numbers.py', 'support.py', 'plural.py']
27 data_files['babel'] = map(lambda f: join(dirname(babel.__file__), f), others)
28 others = ['frontend.py', 'mofile.py']
29 data_files['babel/messages'] = map(lambda f: join(dirname(babel.__file__), 'messages', f), others)
32 tzdir = dirname(pytz.__file__)
33 for root, _, filenames in os.walk(join(tzdir, 'zoneinfo')):
34 base = join('pytz', root[len(tzdir) + 1:])
35 data_files[base] = [join(root, f) for f in filenames]
38 dudir = dirname(docutils.__file__)
39 for root, _, filenames in os.walk(dudir):
40 base = join('docutils', root[len(dudir) + 1:])
41 data_files[base] = [join(root, f) for f in filenames if not f.endswith(('.py', '.pyc', '.pyo'))]
44 pl = dirname(passlib.__file__)
45 for root, _, filenames in os.walk(pl):
46 base = join('passlib', root[len(pl) + 1:])
47 data_files[base] = [join(root, f) for f in filenames if not f.endswith(('.py', '.pyc', '.pyo'))]
49 return data_files.items()
57 {'script': 'odoo.py'},
58 {'script': 'openerp-gevent'},
59 {'script': 'openerp-server', 'icon_resources': [
60 (1, join('setup', 'win32', 'static', 'pixmaps', 'openerp-icon.ico'))
66 'optimize': 0, # Keep the assert running as the integrated tests rely on them.
69 'asynchat', 'asyncore',
80 'lxml', 'lxml._elementpath', 'lxml.builder', 'lxml.etree', 'lxml.objectify',
103 'win32service', 'win32serviceutil',
108 'excludes': ['Tkconstants', 'Tkinter', 'tcl'],
111 'data_files': py2exe_datafiles()
120 description=description,
121 long_description=long_desc,
124 author_email=author_email,
125 classifiers=filter(None, classifiers.split('\n')),
127 scripts=['openerp-server', 'openerp-gevent', 'odoo.py'],
128 packages=find_packages(),
129 package_dir={'%s' % lib_name: 'openerp'},
130 include_package_data=True,
131 dependency_links=['http://download.gna.org/pychart/'],
139 'lxml', # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/
143 'pillow', # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/
144 'psutil', # windows binary code.google.com/p/psutil/downloads/list
147 'pychart', # not on pypi, use: pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
153 'python-ldap', # optional
159 'reportlab', # windows binary pypi.python.org/pypi/reportlab
169 'SSL': ['pyopenssl'],