Skip to content

Commit ceb1a42

Browse files
[build] Add support for Python wheels in SONiC installer (#24427)
[build] Add support for Python wheels in SONiC installer
1 parent bb0612a commit ceb1a42

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

files/build_templates/sonic_debian_extension.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,10 @@ install_deb_package $debs_path/{{pkgname}}
280280
fi
281281
{% endfor %}
282282

283+
{% for wheel in installer_python_wheels.strip().split(' ') -%}
284+
install_pip_package {{wheel}}
285+
{% endfor %}
286+
283287
# Install SONiC Device Data (and its dependencies via 'apt-get -y install -f')
284288
install_deb_package $debs_path/sonic-device-data_*.deb
285289

slave.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
13791379
$$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$$($$*_INSTALLS)) \
13801380
$$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$$($$*_LAZY_INSTALLS)) \
13811381
$$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$$($$*_LAZY_BUILD_INSTALLS)) \
1382+
$$(addprefix $(PYTHON_WHEELS_PATH)/,$$($$*_PYTHON_WHEELS)) \
13821383
$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$(INITRAMFS_TOOLS) \
13831384
$(LINUX_KERNEL) \
13841385
$(SONIC_DEVICE_DATA) \
@@ -1479,6 +1480,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
14791480
export installer_python_debs="$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$(FIPS_BASEIMAGE_PYTHON_INSTALLERS))"
14801481
export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))"
14811482
export lazy_build_installer_debs="$(foreach deb, $($*_LAZY_BUILD_INSTALLS), $(addprefix $($(deb)_MACHINE)|,$(deb)))"
1483+
export installer_python_wheels="$(addprefix $(PYTHON_WHEELS_PATH)/,$($*_PYTHON_WHEELS))"
14821484
export installer_images="$(foreach docker, $($*_DOCKERS),\
14831485
$(addprefix $($(docker:-dbg.gz=.gz)_PACKAGE_NAME)|,\
14841486
$(addprefix $($(docker:-dbg.gz=.gz)_PATH)|,\

0 commit comments

Comments
 (0)