onnxruntime/tools/ci_build/github/azure-pipelines/templates/set-python-manylinux-variables-step.yml
leqiao-1 a6ea278502
add python3.10 support (#10848)
* add python3.10 support

* upgrade numpy version in build pipeline

* add python 3.10 path

* upgrade torch version in build pipeline

* update docker run arguments

* change torch version

* fix typo

* fix permission issue

* change python version

* remove python3.10 for openvino build

* remove python 3.10 for openvino build
2022-03-21 09:46:02 +08:00

34 lines
1,009 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"
}
elif version == "3.10":
variables = {
"PythonManylinuxDir": "/opt/python/cp310-cp310"
}
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))