Add back git requirements as comments & re-run script (#15317)

* Add back git requirements as comments

* Add comment to commented out git lines for clarity

* Re run the updater script

* Add new licenses

* Fix library name
This commit is contained in:
Alan Rominger
2024-10-28 19:44:06 -04:00
committed by GitHub
parent e21dd0a093
commit 68055bb89f
6 changed files with 331 additions and 3 deletions

View File

@@ -25,11 +25,12 @@ generate_requirements() {
${pip_compile} $1 --output-file requirements.txt
# consider the git requirements for purposes of resolving deps
# Then remove any git+ lines from requirements.txt
# Then comment out any git+ lines from requirements.txt
if [[ "$sanitize_git" == "1" ]] ; then
while IFS= read -r line; do
if [[ $line != \#* ]]; then # ignore comments
sed -i "\!${line%#*}!d" requirements.txt
if [[ $line != \#* ]]; then # ignore lines which are already comments
# Add # to the start of any line matched
sed -i "s!^.*${line%#*}!# ${line%#*} # git requirements installed separately!g" requirements.txt
fi
done < "${requirements_git}"
fi;