diff options
| author | Lex Neva <github.com@lexneva.name> | 2020-03-06 22:39:25 -0500 |
|---|---|---|
| committer | Lex Neva <github.com@lexneva.name> | 2020-03-06 22:39:25 -0500 |
| commit | a4277d19a60f1611658897c18d2548fedf52e8f5 (patch) | |
| tree | 6e7b4257e8dce94deff60574a69438c5b8d229b6 /lib/inx | |
| parent | 7cc8b0c14e91d2e68212248b8ce66797ade7bb65 (diff) | |
remove stub
Diffstat (limited to 'lib/inx')
| -rw-r--r-- | lib/inx/utils.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/inx/utils.py b/lib/inx/utils.py index 1dc96829..a7c98a60 100644 --- a/lib/inx/utils.py +++ b/lib/inx/utils.py @@ -1,11 +1,12 @@ import errno -import os import gettext +import os +import sys from os.path import dirname -from jinja2 import Environment, FileSystemLoader -from ..i18n import translation as default_translation, locale_dir, N_ +from jinja2 import Environment, FileSystemLoader +from ..i18n import N_, locale_dir, translation as default_translation _top_path = dirname(dirname(dirname(os.path.realpath(__file__)))) inx_path = os.path.join(_top_path, "inx") @@ -25,6 +26,16 @@ def build_environment(): env.install_gettext_translations(current_translation) env.globals["locale"] = current_locale + if "BUILD" in os.environ: + # building a ZIP release, with inkstitch packaged as a binary + if sys.platform == "win32": + env.globals["command_tag"] = '<command reldir="extensions">inkstitch/bin/inkstitch.exe</command>' + else: + env.globals["command_tag"] = '<command reldir="extensions">inkstitch/bin/inkstitch</command>' + else: + # user is running inkstitch.py directly as a developer + env.globals["command_tag"] = '<command reldir="extensions" interpreter="python">inkstitch.py</command>' + return env |
