Fallback to run_whl

Prefer `pip_runner` but try the `pip` wheel too, if it's missing.
This commit is contained in:
tcely 2025-01-17 13:03:06 -05:00 committed by GitHub
parent 4e51d54ec1
commit ae07c1ce89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,12 +5,13 @@ pip3() {
# pipenv
pip_runner='/usr/lib/python3/dist-packages/pipenv/patched/pip/__pip-runner__.py'
test -s "${pip_runner}" || pip_runner=''
# python3-pip-whl
pip_whl="$(ls -1r /usr/share/python-wheels/pip-*-py3-none-any.whl | head -n 1)"
run_whl="${pip_whl}/pip"
python3 "${pip_runner}" "$@"
python3 "${pip_runner:-"${run_whl}"}" "$@"
}
pip3 install --upgrade --break-system-packages yt-dlp