1 # -*- coding: utf-8 -*-
2 ##############################################################################
4 # OpenERP, Open Source Management Solution
5 # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Affero General Public License as
9 # published by the Free Software Foundation, either version 3 of the
10 # License, or (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Affero General Public License for more details.
17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ##############################################################################
22 import glob, os, re, setuptools, sys
23 from os.path import join
28 for root, dirnames, filenames in os.walk('openerp'):
29 for filename in filenames:
30 if not re.match(r'.*(\.pyc|\.pyo|\~)$', filename):
31 r.setdefault(root, []).append(os.path.join(root, filename))
34 r["Microsoft.VC90.CRT"] = glob.glob('C:\Microsoft.VC90.CRT\*.*')
37 # Add data, but also some .py files py2exe won't include automatically.
38 # TODO This should probably go under `packages`, instead of `data`,
39 # but this will work fine (especially since we don't use the ZIP file
41 r["babel/localedata"] = glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata", '*'))
42 others = ['global.dat', 'numbers.py', 'support.py']
43 r["babel"] = map(lambda f: os.path.join(os.path.dirname(babel.__file__), f), others)
44 others = ['frontend.py', 'mofile.py']
45 r["babel/messages"] = map(lambda f: os.path.join(os.path.dirname(babel.__file__), "messages", f), others)
48 tzdir = os.path.dirname(pytz.__file__)
49 for root, _, filenames in os.walk(os.path.join(tzdir, "zoneinfo")):
50 base = os.path.join('pytz', root[len(tzdir) + 1:])
51 r[base] = [os.path.join(root, f) for f in filenames]
54 dudir = os.path.dirname(docutils.__file__)
55 for root, _, filenames in os.walk(dudir):
56 base = os.path.join('docutils', root[len(dudir) + 1:])
57 r[base] = [os.path.join(root, f) for f in filenames if not f.endswith(('.py', '.pyc', '.pyo'))]
62 file_list="\n".join(data())
63 open('MANIFEST','w').write(file_list)
66 sys.path.append("C:\Microsoft.VC90.CRT")
72 "console" : [ { "script": "openerp-server", "icon_resources": [(1, join("install","openerp-icon.ico"))], }],
76 "optimize": 0, # keep the assert running, because the integrated tests rely on them.
78 "packages": ["HTMLParser", "PIL", "asynchat", "asyncore", "commands", "dateutil", "decimal", "docutils", "email", "encodings", "imaplib", "jinja2", "lxml", "lxml._elementpath", "lxml.builder", "lxml.etree", "lxml.objectify", "mako", "openerp", "poplib", "pychart", "pydot", "pyparsing", "pytz", "reportlab", "select", "simplejson", "smtplib", "uuid", "vatnumber", "vobject", "xml", "xml.dom", "yaml", ],
79 "excludes" : ["Tkconstants","Tkinter","tcl"],
86 execfile(join(os.path.dirname(__file__), 'openerp', 'release.py'))
88 # Notes for OpenERP developer on windows:
90 # To setup a windows developer evironement install python2.7 then pip and use
91 # "pip install <depencey>" for every dependency listed below.
93 # Dependecies that requires DLLs are not installable with pip install, for
94 # them we added comments with links where you can find the installers.
96 # OpenERP on windows also require the pywin32, the binary can be found at
97 # http://pywin32.sf.net
99 # Both python2.7 32bits and 64bits are known to work.
104 description = description,
105 long_description = long_desc,
108 author_email = author_email,
109 classifiers = filter(None, classifiers.split("\n")),
111 scripts = ['openerp-server'],
113 packages = setuptools.find_packages(),
114 dependency_links = ['http://download.gna.org/pychart/'],
115 #include_package_data = True,
117 'pychart', # not on pypi, use: pip install http://download.gna.org/pychart/PyChart-1.39.tar.gz
125 'lxml', # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/
128 'pillow', # windows binary http://www.lfd.uci.edu/~gohlke/pythonlibs/
129 'psutil', # windows binary code.google.com/p/psutil/downloads/list
134 'python-dateutil < 2',
135 'python-ldap', # optional
142 'reportlab', # windows binary pypi.python.org/pypi/reportlab
151 'SSL' : ['pyopenssl'],
153 tests_require = ['unittest2'],
158 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: