Skip to content

Commit

Permalink
{Packaging} Remove Python 2 in setup and doc (#12155)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzhou-msft authored Feb 13, 2020
1 parent 46a142f commit 2415e51
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 26 deletions.
3 changes: 1 addition & 2 deletions doc/command_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,7 @@ Virtual Network Rule Arguments

## Coding Practices

- All code must support Python 2 & 3.
The CLI supports 2.7, 3.5, 3.6, 3.7 and 3.8
- All code must support Python 3.5, 3.6, 3.7 and 3.8
- PRs to Azure/azure-cli and Azure/azure-cli-extensions must pass CI
- Code must pass style checks with pylint and pep8
- (*) All commands should have tests
2 changes: 1 addition & 1 deletion doc/debug/debug_in_vs_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

* Visual Studio Code [Link](http://code.visualstudio.com/)
* Visual Studio Code Python Extension [Link](https://marketplace.visualstudio.com/items?itemName=donjayamanne.python)
* Python 2.7 or 3.5
* Python 3.5+
* Set up development environment [Link](https://github.com/Azure/azure-cli/blob/master/doc/configuring_your_machine.md)

## Quick start
Expand Down
8 changes: 4 additions & 4 deletions doc/extensions/authoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ See [Extension Metadata](metadata.md) for more information.

- When you run `az --version` it will list your normal extensions directory as well as any directories being used to find developer extensions. Developer extensions will appear in the output with a path next to the version number.

### Test your extension on both Python 2 & 3
### Test your extension on Python 3

- The CLI supports both Python 2 & 3 so verify that your extension does the same.
- You can create both a Python 2 and 3 virtual environment and run your extension in both.
- e.g. `virtualenv env27` and `virtualenv -p /usr/local/bin/python3 env`.
- The CLI supports Python 3.5, 3.6, 3.7, 3.8 so verify that your extension does the same.
- You can create virtual environments for different versions and run your extension in them.
- e.g. `python3.6 -m venv env36` and `python3.8 -m venv env38`.


:zap: IMPORTANT :zap:
Expand Down
29 changes: 18 additions & 11 deletions doc/install_linux_prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ Some native Linux packages are required when installing the CLI with:
- Interactive install script
- ``pip``

Current supported Python versions are Python 3.5, 3.6, 3.7, 3.8. Azure CLI packages prior to version 2.1.0 support both Python 2.7 and Python 3.

The commands to run to install the dependencies for some common distributions are listed below.

* Ubuntu
* [12.04 LTS](#ubuntu-1204-lts)
* [14.04 LTS](#ubuntu-1404-lts-and-bash-on-windows-build-14362)
* [15.10](#ubuntu-1510)
* [16.04 LTS](#ubuntu-1604-lts)
* [18.04 LTS](#ubuntu-1804-lts)
* Debian
* [7](#debian-7)
* [8](#debian-8)
Expand All @@ -25,63 +28,67 @@ The commands to run to install the dependencies for some common distributions ar
* [CoreOS](#coreos-stable-899150--beta-101010--alpha-101010)

### Ubuntu 12.04 LTS
Python 2.7.3 should be already on the machine.
Python 2.7.3 should be already on the machine. Install Python 3.5+ if needed.
```
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev
```

### Ubuntu 14.04 LTS and BASH on Windows (Build 14362+)
Python 2.7.6 should be already on the machine.
Python 2.7.6 should be already on the machine. Install Python 3.5+ if needed.
```
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev
```

### Ubuntu 15.10
Python 2.7.10 should be already on the machine.
Python 2.7.10 should be already on the machine. Install Python 3.5+ if needed.
```
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential
```

### Ubuntu 16.04 LTS
Python 2.7.11 should be already on the machine.
```
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential
```

### Ubuntu 18.04 LTS
```
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential
```

### Debian 7
Python 2.7.3 should be already on the machine.
Python 2.7.3 should be already on the machine. Install Python 3.5+ if needed.
```
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev
```

### Debian 8
Python 2.7.9 should be already on the machine.
Python 2.7.9 should be already on the machine. Install Python 3.5+ if needed.
```
sudo apt-get update && sudo apt-get install -y libssl-dev libffi-dev python-dev build-essential
```

### CentOS 6.5 / 6.6 / 6.7

Not supported with the default version of Python (2.6.6) on the machine.
Not supported with the default version of Python (2.6.6) on the machine. Install Python 3.5+ if needed.

### CentOS 7.1 / 7.2
Python 2.7.5 should be already on the machine.
Python 2.7.5 should be already on the machine. Install Python 3.5+ if needed.
```
sudo yum check-update; sudo yum install -y gcc libffi-devel python-devel openssl-devel
```

### RedHat RHEL 6.7

Not supported with the default version of Python (2.6.6) on the machine.
Not supported with the default version of Python (2.6.6) on the machine. Install Python 3.5+ if needed.

### RedHat RHEL 7.2
Python 2.7.5 should be already on the machine.
Python 2.7.5 should be already on the machine. Install Python 3.5+ if needed.
```
sudo yum check-update; sudo yum install -y gcc libffi-devel python-devel openssl-devel
```

### SUSE OpenSUSE 13.2
Python 2.7.8 should be already on the machine.
Python 2.7.8 should be already on the machine. Install Python 3.5+ if needed.
```
sudo zypper refresh && sudo zypper --non-interactive install gcc libffi-devel python-devel openssl-devel
```
Expand Down
2 changes: 0 additions & 2 deletions src/azure-cli-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down
2 changes: 0 additions & 2 deletions src/azure-cli-nspkg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down
2 changes: 0 additions & 2 deletions src/azure-cli-telemetry/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down
2 changes: 0 additions & 2 deletions src/azure-cli-testsdk/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
Expand Down

0 comments on commit 2415e51

Please sign in to comment.