[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
This commit is contained in:
parent
6fb47cf443
commit
fe032878cb
34
setup.py
34
setup.py
|
@ -21,31 +21,29 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import glob, os, re, setuptools, sys
|
import glob, os, re, setuptools, sys
|
||||||
from os.path import join, isfile
|
from os.path import join
|
||||||
|
|
||||||
# List all data files
|
# List all data files
|
||||||
def data():
|
def data():
|
||||||
files = []
|
r = {}
|
||||||
for root, dirnames, filenames in os.walk('openerp'):
|
for root, dirnames, filenames in os.walk('openerp'):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
if not re.match(r'.*(\.pyc|\.pyo|\~)$',filename):
|
if not re.match(r'.*(\.pyc|\.pyo|\~)$', filename):
|
||||||
files.append(os.path.join(root, filename))
|
r.setdefault(root, []).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 os.name == 'nt':
|
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
|
import babel
|
||||||
r.append(("localedata",
|
r["localedata"] = glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata", '*'))
|
||||||
glob.glob(os.path.join(os.path.dirname(babel.__file__), "localedata" , '*'))))
|
|
||||||
|
|
||||||
return r
|
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.items()
|
||||||
|
|
||||||
def gen_manifest():
|
def gen_manifest():
|
||||||
file_list="\n".join(data())
|
file_list="\n".join(data())
|
||||||
|
@ -64,7 +62,7 @@ def py2exe_options():
|
||||||
"skip_archive": 1,
|
"skip_archive": 1,
|
||||||
"optimize": 2,
|
"optimize": 2,
|
||||||
"dist_dir": 'dist',
|
"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"],
|
"excludes" : ["Tkconstants","Tkinter","tcl"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue