Skip to content

Commit

Permalink
Merge branch 'develop' into bugfix/defaults-preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
piiq committed Sep 30, 2024
2 parents 411fad7 + c697f55 commit 3749ebb
Show file tree
Hide file tree
Showing 3 changed files with 518 additions and 453 deletions.
41 changes: 41 additions & 0 deletions openbb_platform/core/openbb_core/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""Script to build the OpenBB platform static assets."""

# flake8: noqa: S603
# pylint: disable=import-outside-toplevel

import subprocess
import sys


def main():
"""Build the OpenBB platform static assets."""
try:
from openbb import build

build()
except (
ImportError,
ModuleNotFoundError,
AttributeError,
) as e:
subprocess.run(
["/bin/echo", "\nOpenBB build script not found, installing from PyPI...\n"],
check=True,
)
subprocess.run(
[sys.executable, "-m", "pip", "install", "openbb", "--no-deps"],
check=True,
)
try:
subprocess.run(
[sys.executable, "-c", "import openbb; openbb.build()"],
check=True,
)
except (subprocess.CalledProcessError, AttributeError):
raise RuntimeError(
"Failed to find the OpenBB build script. Install with `pip install openbb --no-deps`"
) from e


if __name__ == "__main__":
main()
Loading

0 comments on commit 3749ebb

Please sign in to comment.