onnxruntime/tools/ci_build/github/azure-pipelines/templates/set-python-manylinux-variables-step.yml
Changming Sun d8bf9a479b
Remove python 3.6 from training pipelines (#10780)
Because the numpy we use doesn't support python 3.6. And inference pipelines already removed python 3.6.
2022-03-07 09:57:24 -08:00

30 lines
889 B
YAML

# sets Python manylinux variables
# the Python version is specified with the PythonVersion variable
steps:
- task: PythonScript@0
displayName: 'Set Python manylinux variables'
inputs:
scriptSource: inline
script: |
version = "$(PythonVersion)"
if version == "3.7":
variables = {
"PythonManylinuxDir": "/opt/python/cp37-cp37m"
}
elif version == "3.8":
variables = {
"PythonManylinuxDir": "/opt/python/cp38-cp38"
}
elif version == "3.9":
variables = {
"PythonManylinuxDir": "/opt/python/cp39-cp39"
}
else:
raise ValueError("Unsupported Python version: '{}'".format(version))
for name, value in variables.items():
print("Setting variable: {} = '{}'".format(name, value))
print("##vso[task.setvariable variable={}]{}".format(name, value))