# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

trigger:
- master

pool:
  vmImage: 'vs2017-win2016'
strategy:
  matrix:
    Python27:
      python.version: '2.7'
    Python35:
      python.version: '3.5'
    Python36:
      python.version: '3.6'
    Python37:
      python.version: '3.7'

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '$(python.version)'
  displayName: 'Use Python $(python.version)'

- script: |
    python -m pip install --upgrade pip
    pip install -U tox
  displayName: 'Install dependencies'

- script: tox -e py
  displayName: 'Run Tox'

# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python

trigger:
- master

pool:
  vmImage: 'vs2017-win2016'
strategy:
  matrix:
    Python27:
      python.version: '2.7'
    Python35:
      python.version: '3.5'
    Python36:
      python.version: '3.6'
    Python37:
      python.version: '3.7'

steps:
- task: UsePythonVersion@0
  inputs:
    versionSpec: '$(python.version)'
  displayName: 'Use Python $(python.version)'

- script: choco install vcpython27 --yes
  condition: eq(variables['python.version'], '2.7')
  displayName: 'Install vcpython27'

- script: |
    python -m pip install --upgrade pip
    pip install -U tox
  displayName: 'Install dependencies'

- script: tox -e py
  displayName: 'Run Tox'

Install vcpython27 when python.version is 2.7
Install vcpython27 when python.version is 2.7

This commit installs vcpython27 when the python version is 2.7 because
an error occurs without it like this.

 error: Microsoft Visual C++ 9.0 is required. Get it from
        http://aka.ms/vcpython27
