forked from Azure/azure-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Snapcraft yaml for Azure CLI (Azure#5904)
* snapcraft.yaml * add version
- Loading branch information
1 parent
27df455
commit 5ddfad0
Showing
2 changed files
with
63 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: azure-cli | ||
summary: Microsoft Azure CLI 2.0 | ||
description: | | ||
A great cloud needs great tools; we're excited to introduce Azure CLI 2.0, our | ||
next generation multi-platform command line experience for Azure. | ||
version: "release" | ||
version-script: | | ||
grep VERSION src/azure-cli/setup.py | head -n 1 | cut -d'"' -f2 | ||
confinement: classic | ||
grade: stable | ||
apps: | ||
az: | ||
command: usr/bin/python -m azure.cli | ||
completer: az.completion | ||
parts: | ||
azure-cli: | ||
plugin: python | ||
source: . | ||
python-version: python3 | ||
build-packages: | ||
- build-essential | ||
- python3-dev | ||
- python3-wheel | ||
- libffi-dev | ||
- libssl-dev | ||
stage-packages: | ||
- libffi6 | ||
- libssl1.0.0 | ||
requirements: requirements.txt | ||
install: | | ||
python_packages="src/azure-cli-core src/azure-cli-nspkg src/azure-cli-command_modules-nspkg src/command_modules/azure-cli*" | ||
export PYTHONUSERBASE=$SNAPCRAFT_PART_INSTALL | ||
export PYTHONHOME=$SNAPCRAFT_PART_INSTALL/usr | ||
echo $SNAPCRAFT_PART_INSTALL/usr/bin/python3 | ||
$SNAPCRAFT_PART_INSTALL/usr/bin/python3 -c 'import site; print("PYTHONUSERBASE set to {!r}".format(site.getuserbase()))' | ||
$SNAPCRAFT_PART_INSTALL/usr/bin/python3 -m pip install --user $python_packages | ||
$SNAPCRAFT_PART_INSTALL/usr/bin/python3 -m pip install --no-index --user src/azure-cli | ||
install build_scripts/snap/az.snap.completion $SNAPCRAFT_PART_INSTALL/az.completion | ||
# PEP 394 says you should use python3, but the client uses python. | ||
ln -s python3 $SNAPCRAFT_PART_INSTALL/usr/bin/python | ||
prime: | ||
- -lib/python3.5/site-packages/tabulate-0.7.7.dist-info/.PKG-INFO.swp |
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,21 @@ | ||
_python_argcomplete() { | ||
local IFS=$'\013' | ||
local SUPPRESS_SPACE=0 | ||
if compopt +o nospace 2> /dev/null; then | ||
SUPPRESS_SPACE=1 | ||
fi | ||
COMPREPLY=( $(IFS="$IFS" \ | ||
COMP_LINE="$COMP_LINE" \ | ||
COMP_POINT="$COMP_POINT" \ | ||
COMP_TYPE="$COMP_TYPE" \ | ||
_ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" \ | ||
_ARGCOMPLETE=1 \ | ||
_ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE \ | ||
"$SNAP/usr/bin/python" -m azure.cli 8>&1 9>&2 1>/dev/null 2>/dev/null) ) | ||
if [[ $? != 0 ]]; then | ||
unset COMPREPLY | ||
elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "$COMPREPLY" =~ [=/:]$ ]]; then | ||
compopt -o nospace | ||
fi | ||
} | ||
complete -o nospace -F _python_argcomplete azure-cli.az |