production: Fix generating bot static files in production.

For upgrade-zulip-from-git to work, we need to be able to run
update-prod-static on production systems, which means provision code
like this cairosvg logic needs to be there for now.
This commit is contained in:
Tim Abbott
2020-04-17 09:24:31 -07:00
parent 0ccc0f02ce
commit 561ded5e59
4 changed files with 27 additions and 7 deletions

View File

@@ -7,11 +7,13 @@ import shutil
import tempfile
from typing import List, Optional
import cairosvg
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
if ZULIP_PATH not in sys.path:
sys.path.append(ZULIP_PATH)
from scripts.lib.setup_path import setup_path
setup_path()
import cairosvg
from zulip_bots.lib import get_bots_directory_path