diff --git a/contrib/refresh-requirements.sh b/contrib/refresh-requirements.sh index ee82e5f..de38daf 100755 --- a/contrib/refresh-requirements.sh +++ b/contrib/refresh-requirements.sh @@ -18,6 +18,7 @@ # along with this program. If not, see . EXCLUDE_REGEXP="^\(pkg-resources\|satnogs-network\)" +COMPATIBLE_REGEXP="" VIRTUALENV_DIR=$(mktemp -d) PIP_COMMAND="$VIRTUALENV_DIR/bin/pip" @@ -55,6 +56,12 @@ _tmp_requirements_dev=$(mktemp) sort < requirements.txt | comm -13 - "$_tmp_requirements_dev" >> requirements-dev.txt rm -f "$_tmp_requirements_dev" +# Set compatible release packages +if [ -n "$COMPATIBLE_REGEXP" ]; then + sed -i 's/'"$COMPATIBLE_REGEXP"'==\([0-9]\+\)\(\.[0-9]\+\)\+$/\1~=\2.0/' requirements.txt + sed -i 's/'"$COMPATIBLE_REGEXP"'==\([0-9]\+\)\(\.[0-9]\+\)\+$/\1~=\2.0/' requirements-dev.txt +fi + # Verify dependency compatibility "$PIP_COMMAND" check