Fix #1901: Install system dependencies for lxml in workflow and Docker#2006
Fix #1901: Install system dependencies for lxml in workflow and Docker#20067uyash wants to merge 1 commit intoOWASP:masterfrom
Conversation
- Add step to install libxml2-dev and libxslt1-dev before Python dependencies - Required for building lxml==5.3.0 from source - Fixes 'Error: Please make sure the libxml2 and libxslt development packages are installed'
There was a problem hiding this comment.
Pull request overview
This PR addresses missing system dependencies required to compile lxml on Ubuntu 24.04 by adding necessary build libraries to both the GitHub Actions workflow and Dockerfile. The lxml package (version 5.3.0 in requirements.txt) requires libxml2-dev and libxslt1-dev for compilation, which were missing in the publishing-check workflow but already present in build-and-deploy-website workflow.
Changes:
- Added libxml2-dev and libxslt1-dev system dependencies to publishing-check.yml workflow
- Added build dependencies (build-essential, gcc, libxml2-dev, libxslt1-dev, zlib1g-dev) to Dockerfile with proper cleanup
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/publishing-check.yml | Added system dependencies installation step for lxml before Python dependencies |
| Dockerfile | Added build toolchain and XML/XSLT development libraries with apt cache cleanup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Install system dependencies for lxml | ||
| run: sudo apt-get update && sudo apt-get install -y libxml2-dev libxslt1-dev |
There was a problem hiding this comment.
|
|
||
| RUN apt-get update && apt-get install -y \ | ||
| build-essential \ | ||
| gcc \ |
There was a problem hiding this comment.
The Dockerfile includes gcc explicitly on line 6, but gcc is already included in the build-essential package on line 5. This creates redundancy. Consider removing the explicit gcc line since it's already provided by build-essential.
| gcc \ |
This PR fixes issue #1990
I found that publishing-check.yml and the Dockerfile were missing the system libraries required to compile lxml on Ubuntu 24.04.
Changes:
You're A Rockstar
Thank you for submitting a Pull Request (PR) to the Cheat Sheet Series.
Please make sure that for your contribution:
[TEXT](URL)If your PR is related to an issue, please finish your PR text with the following line:
This PR fixes issue #1990 .
AI Tool Usage Disclosure (required for all PRs)
Please select one of the following options:
the contents and I affirm the results. The LLM used is
[llm name and version]and the prompt used is
[your prompt here]. [Feel free to add more details if needed]Thank you again for your contribution 😃