Files
yt-dlp/bundle/docker/linux/build.sh
bashonly 32f1671a90
Some checks failed
Update wiki / Update wiki (push) Has been cancelled
Release (nightly) / Check for new commits (push) Has been cancelled
Release (nightly) / Publish GitHub release (push) Has been cancelled
Release (nightly) / Publish to PyPI (push) Has been cancelled
Challenge Tests / Challenge tests (ubuntu-latest, 3.10) (push) Has been cancelled
Challenge Tests / Challenge tests (ubuntu-latest, 3.11) (push) Has been cancelled
Challenge Tests / Challenge tests (ubuntu-latest, 3.12) (push) Has been cancelled
Challenge Tests / Challenge tests (ubuntu-latest, 3.13) (push) Has been cancelled
Challenge Tests / Challenge tests (ubuntu-latest, 3.14) (push) Has been cancelled
Challenge Tests / Challenge tests (ubuntu-latest, pypy-3.11) (push) Has been cancelled
Challenge Tests / Challenge tests (windows-latest, 3.10) (push) Has been cancelled
Challenge Tests / Challenge tests (windows-latest, 3.11) (push) Has been cancelled
Challenge Tests / Challenge tests (windows-latest, 3.12) (push) Has been cancelled
Challenge Tests / Challenge tests (windows-latest, 3.13) (push) Has been cancelled
Challenge Tests / Challenge tests (windows-latest, 3.14) (push) Has been cancelled
Challenge Tests / Challenge tests (windows-latest, pypy-3.11) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.11) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.12) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.13) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, 3.14) (push) Has been cancelled
Core Tests / Core tests (ubuntu-latest, pypy-3.11) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.10) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.11) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.12) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.13) (push) Has been cancelled
Core Tests / Core tests (windows-latest, 3.14) (push) Has been cancelled
Core Tests / Core tests (windows-latest, pypy-3.11) (push) Has been cancelled
Quick Test / Core test (push) Has been cancelled
Quick Test / Code check (push) Has been cancelled
Release (master) / Publish GitHub release (push) Has been cancelled
Test and lint workflows / Check workflows (push) Has been cancelled
Test and lint workflows / Run zizmor (push) Has been cancelled
Release (master) / Publish to PyPI (push) Has been cancelled
[build] Rename requirements files to clean up dependency graph (#16740)
Authored by: bashonly
2026-05-16 20:30:45 +00:00

37 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -exuo pipefail
if [[ -z "${PYTHON_VERSION:-}" ]]; then
PYTHON_VERSION="3.14"
echo "Defaulting to using Python ${PYTHON_VERSION}"
fi
# Set up virtual environment
rm -rf .venv
py"${PYTHON_VERSION}" -m venv .venv --without-pip
PYTHONPATH="$(py"${PYTHON_VERSION}" -c 'import sysconfig; print(sysconfig.get_path("purelib"))')"
export PYTHONPATH
# shellcheck disable=SC1091
source .venv/bin/activate
python -m pip install -U --require-hashes -r "bundle/requirements/pyinstaller.txt"
python -m pip install -U --require-hashes -r "bundle/requirements/${REQUIREMENTS}.txt"
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