azure-cli: Azure CLI 2.51.0 cannot be released to Homebrew
Latest pip
fails to install azure-mgmt-consumption
2.0.0 from source code https://pypi.org/project/azure-mgmt-consumption/2.0.0/#files
This make homebrew fail to install Azure CLI (https://github.com/Homebrew/homebrew-core/pull/138158):
https://github.com/Homebrew/homebrew-core/actions/runs/5722058178/job/15504679804?pr=138158
2023-08-01T03:12:33.5413100Z creating '/private/tmp/pip-modern-metadata-vjgv3zcx/azure_mgmt_consumption-2.0.0.dist-info'
2023-08-01T03:12:33.5413250Z error: error in setup.cfg: command 'bdist_wheel' has no such option 'azure_namespace_package'
2023-08-01T03:12:33.5413340Z error: subprocess-exited-with-error
To repro locally:
> pip uninstall -y wheel
> pip install https://files.pythonhosted.org/packages/8c/f0/e2d94b246e2dce71eff8d362836a1979f02b4185f5403a13e4fb26c07ccb/azure-mgmt-consumption-2.0.0.zip
Collecting https://files.pythonhosted.org/packages/8c/f0/e2d94b246e2dce71eff8d362836a1979f02b4185f5403a13e4fb26c07ccb/azure-mgmt-consumption-2.0.0.zip
Using cached azure-mgmt-consumption-2.0.0.zip (56 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [13 lines of output]
Wheel is not available, disabling bdist_wheel hook
running dist_info
creating C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption.egg-info
writing C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption.egg-info\PKG-INFO
writing dependency_links to C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption.egg-info\dependency_links.txt
writing requirements to C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption.egg-info\requires.txt
writing top-level names to C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption.egg-info\top_level.txt
writing manifest file 'C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption.egg-info\SOURCES.txt'
creating 'C:\Users\xxx\AppData\Local\Temp\pip-modern-metadata-v6_4olsi\azure_mgmt_consumption-2.0.0.dist-info'
error: error in setup.cfg: command 'bdist_wheel' has no such option 'azure_namespace_package'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 17 (14 by maintainers)
@branchvincent Thanks for your helpful reminder. Both
setuptools
andpip
are required in azure-cli.@bebound this can also be removed from the pinned issue list?
Yea
without_pip: false
is a good short-term workaround. Long term, I’d recommend eithersetupools
(needed anyway for python 3.12+ https://github.com/python/cpython/issues/95299)I guess this is related to changes in pip 23.1:
Another helpful reply about the error: https://github.com/Azure/azure-cli/issues/14416#issuecomment-1507258863 In short, pip calls
python setup.py bdist_wheel
instead ofpython setup.py install
during installation in new version, butazure-mgmt-consumption 2.0
is not compatible with latest wheel when runningpython setup.py bdist_wheel