File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
packages/Debian/common/DEBIAN Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -113,10 +113,22 @@ copy_new_data () {
113
113
}
114
114
115
115
install_pip3_packages () {
116
- python3 -m pip install --upgrade pip
117
- python3 -m pip install -r /usr/local/fledge/python/requirements.txt
116
+ PYTHON_VERSION=$( python3 --version 2>&1 | awk ' {print $2}' )
117
+ PYTHON_MAJOR=$( echo " $PYTHON_VERSION " | cut -d. -f1)
118
+ PYTHON_MINOR=$( echo " $PYTHON_VERSION " | cut -d. -f2)
119
+
120
+ FLAG=" "
121
+ # Set the FLAG only for Python versions 3.11 or higher
122
+ if [ " $PYTHON_MAJOR " -gt 3 ] || { [ " $PYTHON_MAJOR " -eq 3 ] && [ " $PYTHON_MINOR " -ge 11 ]; }; then
123
+ FLAG=" --break-system-packages"
124
+ fi
125
+
126
+ # Install pip and packages with or without the flag
127
+ python3 -m pip install --upgrade pip $FLAG
128
+ python3 -m pip install -r /usr/local/fledge/python/requirements.txt $FLAG
118
129
}
119
130
131
+
120
132
# Call Fledge package update script
121
133
# Any message will be written by called update script
122
134
call_package_update_script () {
You can’t perform that action at this time.
0 commit comments