mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-18 21:21:17 +00:00
33 lines
1,006 B
YAML
33 lines
1,006 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.6":
|
|
variables = {
|
|
"PythonManylinuxDir": "/opt/python/cp36-cp36m"
|
|
}
|
|
elif 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))
|