You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though #14372 migrated CLI packaging system to PEP 420 Implicit Namespace Packages, In Azure CLI installed by Homebrew, azure and azure.mgmt still have __init__.py files:
jiasli
changed the title
In Azure CLI installed by Homebrew, azure and azure.mgmt still have a __init__.py files
In Azure CLI installed by Homebrew, azure and azure.mgmt still have __init__.py files calling pkg_resourcesApr 2, 2022
Homebrew install azure-cli requirements from src. In some packages, the setup.py is not standard and installing these packages will create __init__.py in above folders.
For example, azure-keyvault 1.1.0 uses pkg_resources to accomplish namespace package. But its setup.py does not contain namespace_packages=['azure'], so pip install just copies the __init__.py to azure folder rather than skip it.
One possible fix is updating Homebrew formula to replace src with Wheels, as __init__.py is removed explicitly in Wheels by wheel build script, .
According to tdsmith/homebrew-pypi-poet#42 , homebrew-pypi-poet only support build from source and homebrew also has --no-binary param when install Python dependencies. It seems that we have to update the dependencies to fix this.
Even though #14372 migrated CLI packaging system to PEP 420 Implicit Namespace Packages, In Azure CLI installed by Homebrew,
azure
andazure.mgmt
still have__init__.py
files:This brings problems:
azure
namespace package installed by extensions won't work: Dataprotection ModuleNotFoundError 'azure.mgmt.resourcegraph' azure-cli-extensions#4562pkg_resources
is slow and this slows down the execution speed of Azure CLIThe text was updated successfully, but these errors were encountered: