From 28fc474baec0c8da1d997c9e9708581df24dee51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 17 Nov 2008 00:10:30 +0100 Subject: [PATCH] Handle PLUGINS_PATH for py2exe --- tryton/plugin.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tryton/plugin.py b/tryton/plugin.py index 10a4bca360..5afdc7ed52 100644 --- a/tryton/plugin.py +++ b/tryton/plugin.py @@ -2,12 +2,17 @@ #this repository contains the full copyright notices and license terms. import common import os +import sys import imp import gettext _ = gettext.gettext PLUGINS_PATH = os.path.join(os.path.dirname(__file__), 'plugins') +if not os.path.isdir(PLUGINS_PATH): + # try for py2exe + PLUGINS_PATH = os.path.join(os.path.abspath(os.path.normpath( + os.path.dirname(sys.argv[0]))), 'plugins') MODULES = [] if os.path.isdir(PLUGINS_PATH):