Skip to content

Commit 0dfa973

Browse files
Remove python installation from build images
python should now come fully hermetic from bazel CMK-21151 and CMK-32337 Change-Id: I61ac5fe9fe3cfd96a6a031d31ed5bafafa6adfcd
1 parent 2a45b8d commit 0dfa973

12 files changed

Lines changed: 3 additions & 58 deletions

File tree

buildscripts/infrastructure/build-nodes/almalinux-10/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,6 @@ RUN /opt/install-protobuf-cpp.sh
175175
COPY install-openssl.sh /opt/
176176
RUN /opt/install-openssl.sh
177177

178-
COPY install-python.sh /opt/
179-
RUN /opt/install-python.sh
180178

181179
# install GDB after Python as it requires shared object files, see CMK-15854
182180
COPY install-gdb.sh /opt/
@@ -209,7 +207,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
209207
RUN /opt/install-valgrind.sh link-only
210208
RUN /opt/install-cmake.sh link-only
211209
RUN /opt/install-protobuf-cpp.sh --link-only
212-
RUN /opt/install-python.sh link-only
213210
RUN /opt/install-bazel.sh link-only
214211

215212
# Install non cached dependencies

buildscripts/infrastructure/build-nodes/almalinux-8/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,6 @@ RUN /opt/install-protobuf-cpp.sh
170170
COPY install-openssl.sh /opt/
171171
RUN /opt/install-openssl.sh
172172

173-
COPY install-python.sh /opt/
174-
RUN /opt/install-python.sh
175173

176174
# install GDB after Python as it requires shared object files, see CMK-15854
177175
COPY install-gdb.sh /opt/
@@ -204,7 +202,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
204202
RUN /opt/install-valgrind.sh link-only
205203
RUN /opt/install-cmake.sh link-only
206204
RUN /opt/install-protobuf-cpp.sh --link-only
207-
RUN /opt/install-python.sh link-only
208205
RUN /opt/install-bazel.sh link-only
209206

210207
# Install non cached dependencies

buildscripts/infrastructure/build-nodes/almalinux-9/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,6 @@ RUN /opt/install-protobuf-cpp.sh
199199
COPY install-openssl.sh /opt/
200200
RUN /opt/install-openssl.sh
201201

202-
COPY install-python.sh /opt/
203-
RUN /opt/install-python.sh
204202

205203
# install GDB after Python as it requires shared object files, see CMK-15854
206204
COPY install-gdb.sh /opt/
@@ -233,7 +231,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
233231
RUN /opt/install-valgrind.sh link-only
234232
RUN /opt/install-cmake.sh link-only
235233
RUN /opt/install-protobuf-cpp.sh --link-only
236-
RUN /opt/install-python.sh link-only
237234
RUN /opt/install-bazel.sh link-only
238235

239236
# Install non cached dependencies

buildscripts/infrastructure/build-nodes/debian-12/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ RUN /opt/install-protobuf-cpp.sh
126126
COPY install-openssl.sh /opt/
127127
RUN /opt/install-openssl.sh
128128

129-
COPY install-python.sh /opt/
130-
RUN /opt/install-python.sh
131129

132130
# install GDB after Python as it requires shared object files, see CMK-15854
133131
COPY install-gdb.sh /opt/
@@ -160,7 +158,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
160158
RUN /opt/install-valgrind.sh link-only
161159
RUN /opt/install-cmake.sh link-only
162160
RUN /opt/install-protobuf-cpp.sh --link-only
163-
RUN /opt/install-python.sh link-only
164161
RUN /opt/install-bazel.sh link-only
165162

166163
# Install non cached dependencies

buildscripts/infrastructure/build-nodes/debian-13/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ RUN /opt/install-protobuf-cpp.sh
125125
COPY install-openssl.sh /opt/
126126
RUN /opt/install-openssl.sh
127127

128-
COPY install-python.sh /opt/
129-
RUN /opt/install-python.sh
130128

131129
# install GDB after Python as it requires shared object files, see CMK-15854
132130
COPY install-gdb.sh /opt/
@@ -159,7 +157,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
159157
RUN /opt/install-valgrind.sh link-only
160158
RUN /opt/install-cmake.sh link-only
161159
RUN /opt/install-protobuf-cpp.sh --link-only
162-
RUN /opt/install-python.sh link-only
163160
RUN /opt/install-bazel.sh link-only
164161

165162
# Install non cached dependencies

buildscripts/infrastructure/build-nodes/scripts/install-development.sh

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -297,30 +297,16 @@ install_for_python_dev() {
297297
rm "${SCRIPT_DIR}"/INSTALLED_BY_PYENV
298298
print_debug "INSTALLED_BY_PYENV: $INSTALLED_BY_PYENV"
299299
else
300-
# not installed via pyenv, do it the oldschool way
301-
print_blue "All right, Python will be installed as done in the CI to $TARGET_DIR"
302-
install_python_and_teammates
300+
print_blue "Python comes fully hermetic from bazel, only installing openssl."
301+
install_ssl
303302
fi
304303

305304
print_green "Installation for Python development done"
306305
}
307306

308-
install_python_and_teammates() {
307+
install_ssl() {
309308
export TARGET_DIR="${INSTALL_PATH}"
310309
"${SCRIPT_DIR}"/install-openssl.sh
311-
"${SCRIPT_DIR}"/install-python.sh
312-
313-
if [[ $STRIP_LATER -eq 1 ]]; then
314-
print_blue "strip_binaries during Python setup"
315-
strip_for_python
316-
"${SCRIPT_DIR}"/install-python.sh link-only
317-
fi
318-
}
319-
320-
strip_for_python() {
321-
# strip only the content of the latest created directory
322-
strip_binaries "$(find "${INSTALL_PATH}" -maxdepth 1 -type d -name "Python-*" -print -quit | head -n 1)"
323-
strip_binaries "$(find "${INSTALL_PATH}" -maxdepth 1 -type d -name "openssl-*" -print -quit | head -n 1)"
324310
}
325311

326312
install_for_cpp_dev() {
@@ -539,16 +525,6 @@ if [[ $INSTALL_FOR_AISANDBOX -eq 1 && -z ${CI} ]]; then
539525
install_for_aisandbox
540526
fi
541527

542-
if [[ $STRIP_LATER -gt 1 ]]; then
543-
print_blue "strip_binaries finally"
544-
545-
if [[ $INSTALL_FOR_PYTHON -eq 1 && $INSTALLED_BY_PYENV -eq 0 ]]; then
546-
print_debug "Link Python"
547-
strip_for_python
548-
"${SCRIPT_DIR}"/install-python.sh link-only
549-
fi
550-
fi
551-
552528
if [[ $INSTALL_ONLY -eq 0 ]]; then
553529
# basic tools and env variables required to install docker
554530
"${SCRIPT_DIR}"/install-docker.sh

buildscripts/infrastructure/build-nodes/sles-15sp7/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ RUN /opt/install-protobuf-cpp.sh
138138
COPY install-openssl.sh /opt/
139139
RUN /opt/install-openssl.sh
140140

141-
COPY install-python.sh /opt/
142-
RUN /opt/install-python.sh
143141

144142
# install GDB after Python as it requires shared object files, see CMK-15854
145143
COPY install-gdb.sh /opt/
@@ -172,7 +170,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
172170
RUN /opt/install-valgrind.sh link-only
173171
RUN /opt/install-cmake.sh link-only
174172
RUN /opt/install-protobuf-cpp.sh --link-only
175-
RUN /opt/install-python.sh link-only
176173
RUN /opt/install-bazel.sh link-only
177174

178175
# Install non cached dependencies

buildscripts/infrastructure/build-nodes/sles-16.0/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@ RUN /opt/install-protobuf-cpp.sh
137137
COPY install-openssl.sh /opt/
138138
RUN /opt/install-openssl.sh
139139

140-
COPY install-python.sh /opt/
141-
RUN /opt/install-python.sh
142140

143141
# install GDB after Python as it requires shared object files, see CMK-15854
144142
COPY install-gdb.sh /opt/
@@ -171,7 +169,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
171169
RUN /opt/install-valgrind.sh link-only
172170
RUN /opt/install-cmake.sh link-only
173171
RUN /opt/install-protobuf-cpp.sh --link-only
174-
RUN /opt/install-python.sh link-only
175172
RUN /opt/install-bazel.sh link-only
176173

177174
# Install non cached dependencies

buildscripts/infrastructure/build-nodes/ubuntu-22.04/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,6 @@ RUN /opt/install-protobuf-cpp.sh
138138
COPY install-openssl.sh /opt/
139139
RUN /opt/install-openssl.sh
140140

141-
COPY install-python.sh /opt/
142-
RUN /opt/install-python.sh
143141

144142
# install GDB after Python as it requires shared object files, see CMK-15854
145143
COPY install-gdb.sh /opt/
@@ -172,7 +170,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
172170
RUN /opt/install-valgrind.sh link-only
173171
RUN /opt/install-cmake.sh link-only
174172
RUN /opt/install-protobuf-cpp.sh --link-only
175-
RUN /opt/install-python.sh link-only
176173
RUN /opt/install-bazel.sh link-only
177174

178175
# Install non cached dependencies

buildscripts/infrastructure/build-nodes/ubuntu-24.04/Dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ RUN /opt/install-protobuf-cpp.sh
141141
COPY install-openssl.sh /opt/
142142
RUN /opt/install-openssl.sh
143143

144-
COPY install-python.sh /opt/
145-
RUN /opt/install-python.sh
146144

147145
# install GDB after Python as it requires shared object files, see CMK-15854
148146
COPY install-gdb.sh /opt/
@@ -175,7 +173,6 @@ RUN /opt/install-gnu-toolchain.sh link-only
175173
RUN /opt/install-valgrind.sh link-only
176174
RUN /opt/install-cmake.sh link-only
177175
RUN /opt/install-protobuf-cpp.sh --link-only
178-
RUN /opt/install-python.sh link-only
179176
RUN /opt/install-bazel.sh link-only
180177

181178
# Install non cached dependencies

0 commit comments

Comments
 (0)