[build] drop debian python3-scapy dependency from p4c and use locally built scapy wheel#27890
Open
yijingyan2 wants to merge 1 commit into
Open
[build] drop debian python3-scapy dependency from p4c and use locally built scapy wheel#27890yijingyan2 wants to merge 1 commit into
yijingyan2 wants to merge 1 commit into
Conversation
Signed-off-by: Yijing Yan <yijingyan@microsoft.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the p4lang/p4c build and packaging flow in sonic-buildimage to stop depending on the Debian python3-scapy package and instead rely on SONiC’s locally built scapy Python wheel, aligning p4c with the existing “use wheel-provided Python deps” approach already used for other Python modules.
Changes:
- Add and apply a new p4c patch to remove
python3-scapyfromdebian/control(bothBuild-DependsandDepends). - Ensure
p4lang-p4cpulls in SONiC’sscapywheel via$(P4LANG_P4C)_WHEEL_DEPENDS. - Remove
python3-scapyfrom the trixie slave image package list to avoid relying on the distro package there.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/p4lang/p4lang-p4c.patch/remove-scapy-from-debian-dependency.patch | Drops python3-scapy from p4c Debian build/runtime dependency lists via patch. |
| src/p4lang/Makefile | Applies the new patch during the p4c source build sequence. |
| sonic-slave-trixie/Dockerfile.j2 | Removes python3-scapy from trixie build slave apt package installs. |
| rules/p4lang.mk | Adds scapy wheel dependency for p4lang-p4c to satisfy scapy via SONiC wheel flow. |
saiarcot895
approved these changes
Jun 15, 2026
Collaborator
|
This PR has backport request for branch(es): 202605. ---Powered by SONiC BuildBot
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why I did it
p4lang-p4c currently depends on Debian python3-scapy in both Build-Depends and Depends. In SONiC, scapy is built and provided as a local Python wheel with patches, drop debian python3-scapy dependency from p4c and use locally built scapy wheel instead.
Work item tracking
How I did it
How to verify it
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)