-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
{Package} Migrate CLI packaging system to PEP 420 Implicit Namespace Packages #14372
Conversation
PEP420 |
@@ -0,0 +1,12 @@ | |||
--- | |||
eventgrid partner topic event-subscription update: |
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.
This should be in global suppression already.
scripts/ci/install_azdev.sh
Outdated
@@ -0,0 +1,12 @@ | |||
#!/usr/bin/env bash |
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.
This file should be deleted as well.
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.
Looks like this file is not referenced anywhere.
azure-pipelines.yml
Outdated
@@ -485,7 +485,7 @@ jobs: | |||
displayName: Build Homebrew Formula | |||
|
|||
dependsOn: BuildPythonWheel | |||
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI', 'Manual')) |
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.
No need to build at those trigger condition?
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, will revert these changes before merge it. Just test whether these pipelines can pass.
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.
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 |
@@ -24,6 +24,7 @@ def test_config(self): | |||
|
|||
# C:\Users\{username}\AppData\Local\Temp | |||
tempdir = tempfile.gettempdir() | |||
tempdir = os.path.realpath(tempdir) |
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.
Let's add a comment for this special case on MacOS.
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.
updated.
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.
My parts LGTM.
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__.py
file underazure
andcli
folder in our final distributions on different platforms, includes:Changes
In order to achieve this, several changes are needed as below:
azure-cli-dev-tools
-nspkg
packages(PR)some python sdk dependency
azure-cli
-nspkg
dependencyazure-cli-nspkg
andazure-cli-command_modules-nspkg
__init__.py
,setup.py
andMANIFEST.in
according to azure packaging guide__version__
and__author__
to__main__.py
azure_bdist_wheel
to fix package__main__.py
problemPlan
azure-cli-dev-tools
PRazdev
versionazdev
updates in this PRTesting Guide
azure-cli
on different platform, and see whether__init__.py
still exists.tar.gz
and.whl
files 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.