14 lines
637 B
Bash
Executable File
14 lines
637 B
Bash
Executable File
#!/bin/bash
|
|
# Wrapper to run this project's Python scripts with the right environment.
|
|
#
|
|
# This dev machine has a locally-built libmpv in /usr/local/lib that isn't
|
|
# registered with the system's ldconfig cache, so libmpv.so.2 can't be
|
|
# dlopen()'d unless LD_LIBRARY_PATH is set *before the process starts*
|
|
# (setting os.environ from inside Python is too late -- ctypes/dlopen reads
|
|
# it at exec time). `sudo ldconfig` after adding /usr/local/lib to
|
|
# /etc/ld.so.conf.d/ would fix this system-wide instead, if preferred.
|
|
set -e
|
|
cd "$(dirname "$0")"
|
|
# export LD_LIBRARY_PATH="/usr/local/lib:${LD_LIBRARY_PATH}"
|
|
exec .venv/bin/python3 "$@"
|