setup.py: bring back the block that installs addons

Was removed in d6fc9237a62a4, but is necessary for the creation of distro
packages.

bzr revid: xrg@openerp.com-20110117134841-gcrbv699anl9jcho
This commit is contained in:
P. Christeas 2011-01-17 14:48:41 +01:00
parent 8e809ace7f
commit a228e192a5
1 changed files with 18 additions and 0 deletions

View File

@ -88,6 +88,24 @@ def find_addons():
for root, _, names in os.walk(join('bin', 'addons'), followlinks=True):
if '__openerp__.py' in names or '__terp__.py' in names:
yield basename(root), root
#look for extra modules
try:
empath = os.getenv('EXTRA_MODULES_PATH', '../addons/')
for mname in open(join(empath, 'server_modules.list')):
mname = mname.strip()
if not mname:
continue
terp = join(empath, mname, '__openerp__.py')
if not os.path.exists(terp):
terp = join(empath, mname, '__terp__.py')
if os.path.exists(terp):
yield mname, join(empath, mname)
else:
print "Module %s specified, but no valid path." % mname
except Exception:
pass
def data_files():
'''Build list of data files to be installed'''