mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-03-30 01:39:23 +03:00
[build] Harden build/release workflows (#16358)
Authored by: bashonly, Grub4K Co-authored-by: Simon Sawicki <contact@grub4k.dev>
This commit is contained in:
@@ -6,20 +6,15 @@ if [[ -z "${PYTHON_VERSION:-}" ]]; then
|
||||
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
|
||||
# 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 /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[@]}"
|
||||
source .venv/bin/activate
|
||||
|
||||
python -m pip install -U --require-hashes -r "bundle/requirements/requirements-${REQUIREMENTS}.txt"
|
||||
python -m devscripts.make_lazy_extractors
|
||||
python devscripts/update-version.py -c "${CHANNEL}" -r "${ORIGIN}" "${VERSION}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user