Debian Codegraph @

requirements-update.sh

raw
1 #!/usr/bin/env bash
2
3 # Update `requirements.frozen.txt`. It works by installing the kapidox package with all current dependencies in a fresh
4 # virtualenv and then removing some unwanted fluff. The new frozen requirements contain the newest versions of all
5 # dependencies. If for any reason, ranged version restrictions need to be introduced, this should be done in
6 # `install_requires` in `setup.py`.
7
8 set -ue
9
10 if ! [ -d "kapidox" ]; then
11 echo "FATAL: this must be executed in the root directory of the kapidox project"
12 exit 1
13 fi
14
15 VENV=.kapidox_upgrade_venv
16 FROZEN_REQS=requirements.frozen.txt
17
18 rm -rf $VENV
19
20 python3 -m venv $VENV
21 $VENV/bin/pip install --upgrade pip wheel
22 $VENV/bin/pip install --editable .
23 $VENV/bin/pip freeze > $FROZEN_REQS
24
25 sed -i '/kapidox/d' $FROZEN_REQS # filter out own package as dependency
26 # long standing ubuntu bug - see https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463
27 sed -i '/pkg_resources/d' $FROZEN_REQS
28
29 rm -rf $VENV
30
31 echo "******************************************************************"
32 echo "Dependencies updated to newest versions."
33 echo "Please test if everything still works."
34 echo "******************************************************************"