[REF] packaging: make odoo a namespaced package

by auto-extending addons path with odoo.addons.__path__.

This patch also introduce
  * an explicit declaration of odoo.addons as a namespace package
    This is necessary because the standard way of declaring namespace
    packages in setup.py does not work as long as odoo/__init__.py
    contains code.
  * a more reliable way to find odoo root path.
This commit is contained in:
=?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?=
2016-09-30 12:05:49 +02:00
committed by Simon Lejeune
parent ffd3c513ed
commit 389c2ba97b
5 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env python
__import__('pkg_resources').declare_namespace('odoo.addons')
import odoo
if __name__ == "__main__":
odoo.cli.main()