mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2026-11-06 06:30:39 +00:00
The vendor directory was unconditionally prepended to sys.path, causing pip/pipx installs to load incomplete vendored setuptools (missing data files like Lorem ipsum.txt) instead of the system package. Now the vendor path is only added for PyInstaller frozen builds, and the force-import block in cli.py is similarly guarded behind sys.frozen. Co-Authored-By: Claude Opus 4.6 <[email protected]>
13 lines
498 B
Python
13 lines
498 B
Python
import sys
|
|
from pathlib import Path
|
|
|
|
__version__ = "0.2.15"
|
|
|
|
# Add the vendor directory to sys.path ONLY for PyInstaller (frozen) builds.
|
|
# For pip/pipx installs the system/venv packages are correct and the vendored
|
|
# copies are incomplete (missing data files), so we must not shadow them.
|
|
if getattr(sys, 'frozen', False):
|
|
vendor_dir = Path(sys._MEIPASS).joinpath("voxvera", "vendor")
|
|
if vendor_dir.exists() and str(vendor_dir) not in sys.path:
|
|
sys.path.insert(0, str(vendor_dir))
|