summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@openerp.com>2012-12-06 14:08:48 +0100
committerChristophe Simonis <chs@openerp.com>2012-12-06 14:08:48 +0100
commitfe032878cbeff7f12dc44d67c0aa07710731a1c7 (patch)
tree8516a3328e905b6d454faf483eace49883100289 /setup.py
parent6fb47cf44395208ce837b92054f9be348206b057 (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-xsetup.py34
1 files changed, 16 insertions, 18 deletions
diff --git a/setup.py b/setup.py
index 4f1435c0603..7d41e4d5c3c 100755
--- a/setup.py
+++ b/setup.py
@@ -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"],
}
}