-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Packaging} Only install pymsalruntime on Windows
#31617
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
|
️✔️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>
|
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 updates the MSAL dependency so that the broker extra (pymsalruntime) is only installed on Windows, while non-Windows platforms receive MSAL without the broker extra.
- Split the
msal[broker]requirement into two conditional specifiers based onsys_platform - Ensures Windows installs the broker-enabled MSAL; all other platforms get plain MSAL
Comments suppressed due to low confidence (1)
src/azure-cli-core/setup.py:57
- [nitpick] Add a brief comment above these lines to explain that the broker extra is only installed on Windows, reflecting Azure CLI's current broker support limitation for future maintainers.
'msal[broker]==1.33.0b1; sys_platform == "win32"',
| 'microsoft-security-utilities-secret-masker~=1.0.0b4', | ||
| 'msal-extensions==1.2.0', | ||
| 'msal[broker]==1.33.0b1', | ||
| 'msal[broker]==1.33.0b1; sys_platform == "win32"', |
Copilot
AI
Jun 9, 2025
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.
[nitpick] Consider defining the MSAL version in a single variable (e.g. msal_version = '1.33.0b1') to avoid duplicating the version string across multiple dependency lines: this makes future updates less error-prone.
| 'msal[broker]==1.33.0b1; sys_platform == "win32"', | ||
| 'msal==1.33.0b1; sys_platform != "win32"', |
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.
MSAL uses platform_system:
pymsalruntime>=0.18,<0.19; python_version>='3.8' and platform_system=='Linux'but I prefer using sys_platform which Azure CLI has be using for a long time:
azure-cli/src/azure-cli-core/setup.py
Line 51 in 9071ce0
| 'distro; sys_platform == "linux"', |
azure-cli/src/azure-cli-core/setup.py
Line 62 in 9071ce0
| 'psutil>=5.9; sys_platform != "cygwin"', |
|
Need to change |
|
CI task This seems to be microsoft/azurelinux#13971. |
|
CI task |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
…e to 0.18.1, only install `pymsalruntime` on Windows (#32460)
Description
msal[broker]1.33.0b1 starts to installpymsalruntimeon Linux (AzureAD/microsoft-authentication-library-for-python#766):but there is some problem with
pymsalruntimethat breaks the package build process on various Linux distributions: #31563 (comment).As Azure CLI currently only supports broker on Windows, we only install
pymsalruntimeon Windows.See