Skip to content

Commit e6aa3b8

Browse files
authored
[Build]: Fix pip version constraint conflict issue (#10525)
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.
1 parent 44cf773 commit e6aa3b8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/sonic-build-hooks/scripts/buildinfo_base.sh

+4
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ run_pip_command()
169169
elif [[ "$para" == *.whl ]]; then
170170
package_name=$(echo $para | cut -d- -f1 | tr _ .)
171171
$SUDO sed "/^${package_name}==/d" -i $tmp_version_file
172+
elif [[ "$para" == *==* ]]; then
173+
# fix pip package constraint conflict issue
174+
package_name=$(echo $para | cut -d= -f1)
175+
$SUDO sed "/^${package_name}==/d" -i $tmp_version_file
172176
fi
173177
done
174178

0 commit comments

Comments
 (0)