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:
parent
8e809ace7f
commit
a228e192a5
18
setup.py
18
setup.py
|
@ -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'''
|
||||
|
|
Loading…
Reference in New Issue