-
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
Merged
Changes from all commits
Commits
Show all changes
78 commits
Select commit
Hold shift + click to select a range
409a919
init pep420 change
arrownj 2eaa836
fix linter error
arrownj 13fe8e2
fix another linter error
arrownj 8d8b52c
elegant way to handle __main__.py
arrownj 6e23b62
remove nspkg
arrownj 9a97ee4
refactor azure_bdist_wheel to fit wheel 0.34.2
arrownj b491f97
add namespace package __init__.py to sdist
arrownj 3687e19
fix merge conflict
arrownj 2304e2b
fix generic update problem
arrownj 1a286fd
fix merge conflict
arrownj dda178c
upgrade telemetry version
arrownj efd134e
upgrade telemetry version
arrownj b8f203d
rollback some useless change
arrownj 4d18448
build yum/deb/homebrew etx
arrownj c5d2930
use template to generate formula
arrownj c1e76ea
update build.cmd
arrownj 0a1c170
update build scripts
arrownj d895720
upgrade azure-mutliapi-storage to 0.3.6
arrownj c8166bc
fix debian build script
arrownj 1602765
fix merge conflict
arrownj 09b7101
init pep420 change
arrownj 1dc87c1
fix linter error
arrownj 6a06121
fix another linter error
arrownj a16c155
elegant way to handle __main__.py
arrownj a61214f
remove nspkg
arrownj e5704c9
refactor azure_bdist_wheel to fit wheel 0.34.2
arrownj 0a0edab
add namespace package __init__.py to sdist
arrownj 99cb087
fix merge conflict
arrownj d446a63
fix generic update problem
arrownj 7197682
fix merge conflict
arrownj a43aac5
upgrade telemetry version
arrownj ed508fa
upgrade telemetry version
arrownj 0b73c30
rollback some useless change
arrownj 944f72f
build yum/deb/homebrew etx
arrownj c348606
use template to generate formula
arrownj c5a3468
update build.cmd
arrownj ac40971
update build scripts
arrownj 48240f0
upgrade azure-mutliapi-storage to 0.3.6
arrownj 6bd5326
fix debian build script
arrownj 2a486a8
fix merge conflict
arrownj 5f65b2e
fix merge conflict
arrownj d004fcc
Merge branch 'another_pep420' of github.com:arrownj/azure-cli into an…
arrownj 46bd50f
fix generic update test problem
arrownj 2bfc20e
remove extra __init__.py
arrownj 703c683
Merge branch 'dev' into another_pep420
arrownj 4fcf574
remove __init__.pyc file in debian and rpm
arrownj 53569e5
update build wheel stratages
arrownj 36417c4
Merge branch 'dev' into another_pep420
arrownj 4d87e27
update version
arrownj 8206299
update build scripts
arrownj 81fbb36
fix webapp test error
arrownj 7f47f19
add __main__.py in sdist
arrownj 6dbf584
Merge branch 'dev' into another_pep420
arrownj 7cec6fb
add test homebrew package scripts
arrownj 9dda359
Merge branch 'dev' into another_pep420
arrownj e3087c5
update version value in __main__.py
arrownj 525de65
make test_homebrew_package.sh executable
arrownj dea113d
fix homebrew permission problem
arrownj 22fef1e
fix error
arrownj 1623787
skip some acr tests
arrownj acbdbc6
fix style error
arrownj 6b5db1a
skip config tests
arrownj b254fdb
fix config test MAC error
arrownj 866972d
fix role config test error
arrownj 46883bc
Merge branch 'dev' into another_pep420
arrownj ded0f26
fix test error
arrownj 7e2fe75
fix test error
arrownj 16f6aff
workaround for vsts bug
arrownj 31e7934
fix test error
arrownj 5c2a43d
fix homebrew test error
arrownj fec21db
fix configure test error
arrownj 366e22f
Merge remote-tracking branch 'upstream/dev' into another_pep420
arrownj b35b767
update homebrew package job timeout value
arrownj 5ccc96c
use released azdev
arrownj 225a8c4
Merge branch 'dev' into another_pep420
arrownj 12403e8
rollback pipelines
arrownj ede06e0
rollback pipelines 2
arrownj 320bd06
refactor config test
arrownj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Extract the version of the CLI from azure-cli package's __init__.py file. | ||
# Extract the version of the CLI from azure-cli package's __main__.py file. | ||
|
||
: "${BUILD_STAGINGDIRECTORY:?BUILD_STAGINGDIRECTORY environment variable not set}" | ||
|
||
ver=`cat src/azure-cli/azure/cli/__init__.py | grep __version__ | sed s/' '//g | sed s/'__version__='// | sed s/\"//g` | ||
ver=`cat src/azure-cli/azure/cli/__main__.py | grep __version__ | sed s/' '//g | sed s/'__version__='// | sed s/\"//g` | ||
echo $ver > $BUILD_STAGINGDIRECTORY/version | ||
echo $ver > $BUILD_STAGINGDIRECTORY/azure-cli-${ver}.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,20 @@ class AzureCli < Formula | |
url "{{ upstream_url }}" | ||
version "{{ cli_version }}" | ||
sha256 "{{ upstream_sha }}" | ||
license "MIT" | ||
head "https://github.com/Azure/azure-cli.git" | ||
|
||
{{ bottle_hash }} | ||
|
||
depends_on "[email protected]" | ||
depends_on "[email protected]" | ||
|
||
uses_from_macos "libffi" | ||
|
||
on_linux do | ||
depends_on "pkg-config" => :build | ||
end | ||
|
||
{{ resources }} | ||
|
||
def install | ||
|
@@ -28,8 +35,6 @@ class AzureCli < Formula | |
buildpath/"src/azure-cli", | ||
buildpath/"src/azure-cli-telemetry", | ||
buildpath/"src/azure-cli-core", | ||
buildpath/"src/azure-cli-nspkg", | ||
buildpath/"src/azure-cli-command_modules-nspkg", | ||
] | ||
|
||
# Install CLI | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
import os | ||
import sys | ||
import subprocess | ||
|
||
if len(sys.argv) < 2: | ||
print('AZ_BASE or PYTHON_VERSION are not specified') | ||
sys.exit(-1) | ||
|
||
az_base = sys.argv[1] | ||
python_version = sys.argv[2] | ||
|
||
root_dir = '{}/lib/{}/site-packages/azure/cli/command_modules'.format(az_base, python_version) | ||
mod_list = [mod for mod in sorted(os.listdir(root_dir)) if os.path.isdir(os.path.join(root_dir, mod)) and mod != '__pycache__'] | ||
|
||
pytest_base_cmd = 'PYTHONPATH={}/lib/{}/site-packages python -m pytest -x -v --boxed -p no:warnings --log-level=WARN'.format(az_base, python_version) | ||
pytest_parallel_cmd = '{} -n auto'.format(pytest_base_cmd) | ||
|
||
for mod_name in mod_list: | ||
if mod_name in ['botservice', 'network', 'configure']: | ||
exit_code = subprocess.call(['{} --junit-xml ./azure_cli_test_result/{}.xml --pyargs azure.cli.command_modules.{}'.format(pytest_base_cmd, mod_name, mod_name)], shell=True) | ||
else: | ||
exit_code = subprocess.call(['{} --junit-xml ./azure_cli_test_result/{}.xml --pyargs azure.cli.command_modules.{}'.format(pytest_parallel_cmd, mod_name, mod_name)], shell=True) | ||
if exit_code == 5: | ||
print('No tests found for {}'.format(mod_name)) | ||
elif exit_code != 0: | ||
sys.exit(exit_code) | ||
|
||
exit_code = subprocess.call(['{} --junit-xml ./azure_cli_test_result/azure-cli-core.xml --pyargs azure.cli.core'.format(pytest_base_cmd)], shell=True) | ||
sys.exit(exit_code) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is this for building snap package?