-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Packaging} Install bz2 module in embedded Python on Linux #32163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
️✔️AzureCLI-FullTest
|
|
Hi @mainred, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses a ModuleNotFoundError for the '_bz2' module by adding the libbz2-dev package to the Debian build dependencies. The error was occurring when the aks-agent extension tried to import the bz2 module, which requires the underlying C library to be available during Python compilation.
- Added
libbz2-devto the list of packages installed during Debian build process
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Co-authored-by: Hang <[email protected]>
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
| # uuid-dev is used to build _uuid module: https://github.com/python/cpython/pull/3796 | ||
| apt-get install -y libssl-dev libffi-dev python3-dev zlib1g-dev uuid-dev wget debhelper | ||
| # libbz2-dev is used to install bz2 module: https://github.com/Azure/azure-cli/pull/32163 | ||
| apt-get install -y libssl-dev libffi-dev python3-dev zlib1g-dev uuid-dev wget debhelper libbz2-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about RPM? Does the system Python installed by RPM already have bz2 support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the RPM system Python contains this module.
| # uuid-dev is used to build _uuid module: https://github.com/python/cpython/pull/3796 | ||
| apt-get install -y libssl-dev libffi-dev python3-dev zlib1g-dev uuid-dev wget debhelper | ||
| # libbz2-dev is used to install bz2 module: https://github.com/Azure/azure-cli/pull/32163 | ||
| apt-get install -y libssl-dev libffi-dev python3-dev zlib1g-dev uuid-dev wget debhelper libbz2-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The optional package libbz2-dev is documented by https://devguide.python.org/getting-started/setup-building/#install-dependencies under the Linux tab.
If you want to build all optional modules, install the following packages and their dependencies:
sudo apt-get install build-essential gdb lcov pkg-config \ libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \ libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \ lzma lzma-dev tk-dev uuid-dev zlib1g-dev libmpdec-dev libzstd-dev \ inetutils-inetd
| # uuid-dev is used to build _uuid module: https://github.com/python/cpython/pull/3796 | ||
| apt-get install -y libssl-dev libffi-dev python3-dev zlib1g-dev uuid-dev wget debhelper | ||
| # libbz2-dev is used to install bz2 module: https://github.com/Azure/azure-cli/pull/32163 | ||
| apt-get install -y libssl-dev libffi-dev python3-dev zlib1g-dev uuid-dev wget debhelper libbz2-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to mention bz2 is required by aks-agent and aks-preview (Azure/azure-cli-extensions#8984) extensions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, this comment already serves this purpose.
Related command
Description
To address Azure/azure-cli-extensions#8984
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.