mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-21 22:50:51 +10:00
Build-Binary.command: Add homebrew pathing support
Co-Authored By: Jim B <bosephus61@gmail.com>
This commit is contained in:
@@ -51,6 +51,16 @@ class create_binary:
|
|||||||
python_path = sys.executable
|
python_path = sys.executable
|
||||||
python_binary = python_path.split("/")[-1]
|
python_binary = python_path.split("/")[-1]
|
||||||
python_bin_dir = python_path.strip(python_binary)
|
python_bin_dir = python_path.strip(python_binary)
|
||||||
|
|
||||||
|
# macOS (using Python installed by homebrew (e.g. brew))
|
||||||
|
if f"/usr/local/opt/python@3." in sys.executable:
|
||||||
|
print(f"\t* NOTE: home(brew) python3 detected; using (sys.exec_prefix, python_path) ==> {sys.exec_prefix, python_path}")
|
||||||
|
# - under brew, pip3 will install pyinstall at:
|
||||||
|
# /usr/local/lib/python3.9/site-packages/pyinstaller
|
||||||
|
# and /usr/local/bin/pyinstaller stub to load and run.
|
||||||
|
|
||||||
|
pyinstaller_path = f"/usr/local/bin/pyinstaller"
|
||||||
|
else:
|
||||||
pyinstaller_path = f"{python_bin_dir}pyinstaller"
|
pyinstaller_path = f"{python_bin_dir}pyinstaller"
|
||||||
|
|
||||||
if not Path(pyinstaller_path).exists():
|
if not Path(pyinstaller_path).exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user