onnxruntime/tools/ci_build/github/azure-pipelines/templates/set-python-manylinux-variables-step.yml
Jian Chen 85948d6bc6
Cjian/windows update python3.11 (#15243)
### Description
windows update python3.11



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

---------

Co-authored-by: Ubuntu <chasun@chasunlinux.lw3b1xzoyrkuzm34swpscft0ff.dx.internal.cloudapp.net>
2023-03-28 22:15:47 -07:00

38 lines
1.1 KiB
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"
}
elif version == "3.10":
variables = {
"PythonManylinuxDir": "/opt/python/cp310-cp310"
}
elif version == "3.11":
variables = {
"PythonManylinuxDir": "/opt/python/cp311-cp311"
}
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))