File indexing completed on 2024-04-21 03:52:27

0001 #!/usr/bin/env bash
0002 
0003 # Update `requirements.frozen.txt`. It works by installing the kapidox package with all current dependencies in a fresh
0004 # virtualenv and then removing some unwanted fluff. The new frozen requirements contain the newest versions of all
0005 # dependencies. If for any reason, ranged version restrictions need to be introduced, this should be done in
0006 # `install_requires` in `setup.py`.
0007 
0008 set -ue
0009 
0010 if ! [ -d "kapidox" ]; then
0011   echo "FATAL: this must be executed in the root directory of the kapidox project"
0012   exit 1
0013 fi
0014 
0015 VENV=.kapidox_upgrade_venv
0016 FROZEN_REQS=requirements.frozen.txt
0017 
0018 rm -rf $VENV
0019 
0020 python3 -m venv $VENV
0021 $VENV/bin/pip install --upgrade pip wheel
0022 $VENV/bin/pip install --editable .
0023 $VENV/bin/pip freeze > $FROZEN_REQS
0024 
0025 sed -i '/kapidox/d' $FROZEN_REQS  # filter out own package as dependency
0026 # long standing ubuntu bug - see https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1635463
0027 sed -i '/pkg_resources/d' $FROZEN_REQS
0028 
0029 rm -rf $VENV
0030 
0031 echo "******************************************************************"
0032 echo "Dependencies updated to newest versions."
0033 echo "Please test if everything still works."
0034 echo "******************************************************************"