1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2026-01-30 10:42:05 +00:00
Files
yt-dlp/bundle/docker/linux/build.sh
bashonly a65349443b [cleanup] Misc (#15430)
Authored by: bashonly, Grub4K, seproDev

Co-authored-by: sepro <sepro@sepr0.com>
Co-authored-by: Simon Sawicki <contact@grub4k.dev>
2026-01-29 16:22:35 +00:00

41 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
set -exuo pipefail
if [[ -z "${PYTHON_VERSION:-}" ]]; then
PYTHON_VERSION="3.13"
echo "Defaulting to using Python ${PYTHON_VERSION}"
fi
INCLUDES=(
--include-extra pyinstaller
--include-extra secretstorage
)
if [[ -z "${EXCLUDE_CURL_CFFI:-}" ]]; then
INCLUDES+=(--include-extra build-curl-cffi)
fi
py"${PYTHON_VERSION}" -m venv /yt-dlp-build-venv
# shellcheck disable=SC1091
source /yt-dlp-build-venv/bin/activate
# Inside the venv we can use python instead of py3.13 or py3.14 etc
python -m devscripts.install_deps "${INCLUDES[@]}"
python -m devscripts.make_lazy_extractors
python devscripts/update-version.py -c "${CHANNEL}" -r "${ORIGIN}" "${VERSION}"
if [[ -z "${SKIP_ONEDIR_BUILD:-}" ]]; then
mkdir -p /build
python -m bundle.pyinstaller --onedir --distpath=/build
pushd "/build/${EXE_NAME}"
chmod +x "${EXE_NAME}"
python -m zipfile -c "/yt-dlp/dist/${EXE_NAME}.zip" ./
popd
fi
if [[ -z "${SKIP_ONEFILE_BUILD:-}" ]]; then
python -m bundle.pyinstaller
chmod +x "./dist/${EXE_NAME}"
fi
deactivate