refresh-requirements.sh: Add support for comptible release packages
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>merge-requests/737/head
parent
b522d4304c
commit
0dafea4b46
|
@ -18,6 +18,7 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue