{Package} Migrate CLI packaging system to PEP 420 Implicit Namespace Packages#14372
Conversation
|
PEP420 |
There was a problem hiding this comment.
This should be in global suppression already.
scripts/ci/install_azdev.sh
Outdated
There was a problem hiding this comment.
This file should be deleted as well.
There was a problem hiding this comment.
Looks like this file is not referenced anywhere.
azure-pipelines.yml
Outdated
There was a problem hiding this comment.
No need to build at those trigger condition?
There was a problem hiding this comment.
yes, will revert these changes before merge it. Just test whether these pipelines can pass.
fengzhou-msft
left a comment
There was a problem hiding this comment.
LGTM, please test the upgrade case as well as the new install case.
|
Just be curiously, our relase pipeline also publishes pakage to the following platforms: Will these changes affect the packages for the above platforms? |
We don't consider the scenario like that. We build package on Windows, MAC, pypi, RPM, DEB, the 3 target platforms you mentioned are all using these distributions. We have test it on all OS platforms. So I think it can cover the scenario you mentioned. |
Got it~ thanks |
|
|
||
| # C:\Users\{username}\AppData\Local\Temp | ||
| tempdir = tempfile.gettempdir() | ||
| tempdir = os.path.realpath(tempdir) |
There was a problem hiding this comment.
Let's add a comment for this special case on MacOS.
|
This PR was first included in Azure CLI 2.11.0. |
Description
Close #13293
Background
PEP420 is an official python enhancement proposal which introduces implicit namespace package.
There are 3 ways to declare a namespace package.
Currently, azure cli is using pkg_resource style namespace package, which is no longer recommended per python official document. Besides, pkg_resource style namespace package performs slow when importing python modules.
This PR is to migrate azure cli namespace package to native style. Refer Packaging namespace packages to see details about above 3 namespace package styles.
There is also a guide about how to do azure sdk package. Refer Azure packaging to see the details.
We will follow this guide to to do azure cli packaging.
Goal
The main goal of this task to to remove
__init__.pyfile underazureandclifolder in our final distributions on different platforms, includes:Changes
In order to achieve this, several changes are needed as below:
azure-cli-dev-tools
-nspkgpackages(PR)some python sdk dependency
azure-cli
-nspkgdependencyazure-cli-nspkgandazure-cli-command_modules-nspkg__init__.py,setup.pyandMANIFEST.inaccording to azure packaging guide__version__and__author__to__main__.pyazure_bdist_wheelto fix package__main__.pyproblemPlan
azure-cli-dev-toolsPRazdevversionazdevupdates in this PRTesting Guide
azure-clion different platform, and see whether__init__.pystill exists.tar.gzand.whlfiles are same with previous ones.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 feature.
This 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.