diff options
| author | Christophe Simonis <chs@openerp.com> | 2012-12-06 14:08:48 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@openerp.com> | 2012-12-06 14:08:48 +0100 |
| commit | fe032878cbeff7f12dc44d67c0aa07710731a1c7 (patch) | |
| tree | 8516a3328e905b6d454faf483eace49883100289 /setup.py | |
| parent | 6fb47cf44395208ce837b92054f9be348206b057 (diff) | |
[FIX] correct setup.py
lp bug: https://launchpad.net/bugs/1087192 fixed
lp bug: https://launchpad.net/bugs/1017120 fixed
bzr revid: chs@openerp.com-20121206130848-a3jz9ntihfh6payu
Diffstat (limited to 'setup.py')
| -rwxr-xr-x | setup.py | 34 |
1 files changed, 16 insertions, 18 deletions
@@ -21,31 +21,29 @@ ############################################################################## import glob, os, re, setuptools, sys -from os.path import join, isfile +from os.path import join # List all data files def data(): - files = [] + r = {} for root, dirnames, filenames in os.walk('openerp'): for filename in filenames: - if not re.match(r'.*(\.pyc|\.pyo|\~)$',filename): - files.append(os.path.join(root, filename)) - d = {} - for v in files: - k=os.path.dirname(v) - if k in d: - d[k].append(v) - else: - d[k]=[v] - r = d.items() + if not re.match(r'.*(\.pyc|\.pyo|\~)$', filename): + r.setdefault(root, []).append(os.path.join(root, filename)) + if os.name == 'nt': - r.append(("Microsoft.VC90.CRT", glob.glob('C:\Microsoft.VC90.CRT\*.*'))) + r["Microsoft.VC90.CRT"] = glob.glob('C:\Microsoft.VC90.CRT\*.*') + + import babel + r["localedata"] = glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata", '*')) - import babel - r.append(("localedata", - glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata" , '*')))) + import pytz + tzdir = os.path.dirname(pytz.__file__) + for root, _, filenames in os.walk(os.path.join(tzdir, "zoneinfo")): + base = os.path.join('pytz', root[len(tzdir) + 1:]) + r[base] = [os.path.join(root, f) for f in filenames] - return r + return r.items() def gen_manifest(): file_list="\n".join(data()) @@ -64,7 +62,7 @@ def py2exe_options(): "skip_archive": 1, "optimize": 2, "dist_dir": 'dist', - "packages": [ "DAV", "HTMLParser", "PIL", "asynchat", "asyncore", "commands", "dateutil", "decimal", "docutils", "email", "encodings", "imaplib", "lxml", "lxml._elementpath", "lxml.builder", "lxml.etree", "lxml.objectify", "mako", "openerp", "poplib", "pychart", "pydot", "pyparsing", "reportlab", "select", "simplejson", "smtplib", "uuid", "vatnumber", "vobject", "xml", "xml.dom", "yaml", ], + "packages": [ "DAV", "HTMLParser", "PIL", "asynchat", "asyncore", "commands", "dateutil", "decimal", "docutils", "email", "encodings", "imaplib", "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", ], "excludes" : ["Tkconstants","Tkinter","tcl"], } } |
