summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorStéphane Bidoul (ACSONE) <stephane.bidoul@acsone.eu>2017-09-17 16:44:02 +0200
committerOlivier Dony <odo@openerp.com>2017-09-18 16:05:31 +0200
commit8bf06adc8d78c1bff8dc80ce53d6646e3ad22fff (patch)
tree313f3a8dd72725092d9bea66b9de2116e459d471 /setup
parent5d51950b59d63600f10990c085057326eee191c9 (diff)
[FIX] namespace packages: move from pkg_resources-style to pkg_util
Deprecates the previous pkg_resources-style packages. Our use was not entirely spec compliant, and it broke with setuptools 31. More information in https://github.com/odoo/odoo/pull/15718 Instead, use the pkgutil-style namespace packages. This is spec compliant as long as all other distributions providing odoo.addons use PEP 420 namespace packages (i.e. no __init__.py). So this mechanism fully works on Python 3 only, but does not break anything on Python 2. See also: https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages Closes #19517 Fixes #15718
Diffstat (limited to 'setup')
-rw-r--r--setup/odoo1
1 files changed, 0 insertions, 1 deletions
diff --git a/setup/odoo b/setup/odoo
index 535ea47f60f..fae9bf233b6 100644
--- a/setup/odoo
+++ b/setup/odoo
@@ -2,7 +2,6 @@
# set server timezone in UTC before time module imported
__import__('os').environ['TZ'] = 'UTC'
-__import__('pkg_resources').declare_namespace('odoo.addons')
import odoo
if __name__ == "__main__":