Skip to content

Commit

Permalink
[Build]: Fix pip version constraint conflict issue (sonic-net#10525)
Browse files Browse the repository at this point in the history
Why I did it
[Build]: Fix pip version constraint conflict issue
When a version is specified in the constraint file, if upgrading the version in build script, it will have conflict issue.

How I did it
If a specified version has specified in pip command line, then the version constraint will be skipped.
  • Loading branch information
xumia committed Apr 29, 2022
1 parent dd8036a commit 029f2fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sonic-build-hooks/scripts/buildinfo_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ run_pip_command()
elif [[ "$para" == *.whl ]]; then
package_name=$(echo $para | cut -d- -f1 | tr _ .)
$SUDO sed "/^${package_name}==/d" -i $tmp_version_file
elif [[ "$para" == *==* ]]; then
# fix pip package constraint conflict issue
package_name=$(echo $para | cut -d= -f1)
$SUDO sed "/^${package_name}==/d" -i $tmp_version_file
fi
done

Expand Down

0 comments on commit 029f2fe

Please sign in to comment.