mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-21 21:52:11 +00:00
42 lines
1.5 KiB
YAML
42 lines
1.5 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.5":
|
|
variables = {
|
|
"PythonManylinuxDir": "/opt/python/cp35-cp35m",
|
|
"PythonManylinuxIncludeDir": "/opt/python/cp35-cp35m/include/python3.5m",
|
|
}
|
|
elif version == "3.6":
|
|
variables = {
|
|
"PythonManylinuxDir": "/opt/python/cp36-cp36m",
|
|
"PythonManylinuxIncludeDir": "/opt/python/cp36-cp36m/include/python3.6m",
|
|
}
|
|
elif version == "3.7":
|
|
variables = {
|
|
"PythonManylinuxDir": "/opt/python/cp37-cp37m",
|
|
"PythonManylinuxIncludeDir": "/opt/python/cp37-cp37m/include/python3.7m",
|
|
}
|
|
elif version == "3.8":
|
|
variables = {
|
|
"PythonManylinuxDir": "/opt/python/cp38-cp38",
|
|
"PythonManylinuxIncludeDir": "/opt/python/cp38-cp38/include/python3.8",
|
|
}
|
|
elif version == "3.9":
|
|
variables = {
|
|
"PythonManylinuxDir": "/opt/python/cp39-cp39",
|
|
"PythonManylinuxIncludeDir": "/opt/python/cp39-cp39/include/python3.9",
|
|
}
|
|
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))
|