mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-20 10:09:04 +00:00
This is used to make sure we also freeze versions for packages that will only be used on Windows or OS X, while the freezing script is most likely only be run on Linux.
39 lines
1.2 KiB
Bash
Executable file
39 lines
1.2 KiB
Bash
Executable file
#!/bin/bash
|
|
# Run this after a new release to update dependencies
|
|
|
|
venv_dir=~/.electrum-venv
|
|
contrib=$(dirname "$0")
|
|
|
|
which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit 1; }
|
|
python3 -m hashin -h > /dev/null 2>&1 || { python3 -m pip install hashin; }
|
|
other_python=$(which python3)
|
|
|
|
for i in '' '-hw' '-binaries'; do
|
|
rm -rf "$venv_dir"
|
|
virtualenv -p $(which python3) $venv_dir
|
|
|
|
source $venv_dir/bin/activate
|
|
|
|
echo "Installing $m dependencies"
|
|
|
|
python -m pip install -r $contrib/requirements/requirements${i}.txt --upgrade
|
|
|
|
echo "OK."
|
|
|
|
requirements=$(pip freeze)
|
|
restricted=$(echo $requirements | $other_python ./deterministic-build/find_restricted_dependencies.py)
|
|
requirements="$requirements $restricted"
|
|
|
|
echo "Generating package hashes..."
|
|
rm $contrib/deterministic-build/requirements${i}.txt
|
|
touch $contrib/deterministic-build/requirements${i}.txt
|
|
|
|
for requirement in $requirements; do
|
|
echo -e "\r Hashing $requirement..."
|
|
$other_python -m hashin -r $contrib/deterministic-build/requirements${i}.txt ${requirement}
|
|
done
|
|
|
|
echo "OK."
|
|
done
|
|
|
|
echo "Done. Updated requirements"
|