forked from Azure/azure-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.snapcraft.yaml
42 lines (42 loc) · 1.6 KB
/
.snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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