mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-25 02:33:10 +00:00
Portfolio binary bug fix (#2700)
* Removing unused dylib * Deleting commented out code * actually removing the binary * refactoring
This commit is contained in:
14
build/pyinstaller/terminal.spec
vendored
14
build/pyinstaller/terminal.spec
vendored
@@ -1,5 +1,6 @@
|
||||
# -*- mode: python ; coding: utf-8 -*-
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
from dotenv import set_key
|
||||
|
||||
@@ -8,6 +9,9 @@ from PyInstaller.building.api import PYZ, EXE, COLLECT
|
||||
from PyInstaller.building.splash import Splash
|
||||
from PyInstaller.building.build_main import Analysis
|
||||
|
||||
|
||||
# import subprocess
|
||||
|
||||
from openbb_terminal.loggers import get_commit_hash
|
||||
|
||||
NAME = "OpenBBTerminal"
|
||||
@@ -19,6 +23,14 @@ build_type = (
|
||||
# Local python environment packages folder
|
||||
pathex = os.path.join(os.path.dirname(os.__file__), "site-packages")
|
||||
|
||||
# Removing unused ARM64 binary
|
||||
binary_to_remove = pathlib.Path(
|
||||
os.path.join(pathex, "_scs_direct.cpython-39-darwin.so")
|
||||
)
|
||||
print("Removing ARM64 Binary: _scs_direct.cpython-39-darwin.so")
|
||||
binary_to_remove.unlink(missing_ok=True)
|
||||
|
||||
|
||||
# Get latest commit
|
||||
commit_hash = get_commit_hash()
|
||||
build_assets_folder = os.path.join(os.getcwd(), "build", "pyinstaller")
|
||||
@@ -81,6 +93,7 @@ hidden_imports = [
|
||||
"bson",
|
||||
]
|
||||
|
||||
|
||||
analysis_kwargs = dict(
|
||||
scripts=[os.path.join(os.getcwd(), "terminal.py")],
|
||||
pathex=[pathex, "."],
|
||||
@@ -120,6 +133,7 @@ exe_kwargs = dict(
|
||||
entitlements_file=None,
|
||||
)
|
||||
|
||||
|
||||
# Packaging settings
|
||||
if build_type == "onefile":
|
||||
exe_args += [a.binaries, a.zipfiles, a.datas]
|
||||
|
||||
Reference in New Issue
Block a user