onnxruntime/tools/ci_build/github/azure-pipelines/templates/set-py-packaging-variables-step.yml
edgchen1 e259a13f8e
Initial training Python packaging pipeline (#3767)
Add a pipeline to produce training-enabled ORT wheels.
2020-05-18 09:41:00 -07:00

40 lines
1.5 KiB
YAML

# sets some Python-related variables based on the value of the python.version variable
steps:
- task: PythonScript@0
displayName: 'Set Python packaging variables'
inputs:
scriptSource: inline
script: |
version = "$(python.version)"
if version == "3.5":
variables = {
"python.manylinux.dir": "/opt/python/cp35-cp35m",
"python.manylinux.include.dir": "/opt/python/cp35-cp35m/include/python3.5m",
"python.whl.impl.abi.tags": "cp35-cp35m",
}
elif version == "3.6":
variables = {
"python.manylinux.dir": "/opt/python/cp36-cp36m",
"python.manylinux.include.dir": "/opt/python/cp36-cp36m/include/python3.6m",
"python.whl.impl.abi.tags": "cp36-cp36m",
}
elif version == "3.7":
variables = {
"python.manylinux.dir": "/opt/python/cp37-cp37m",
"python.manylinux.include.dir": "/opt/python/cp37-cp37m/include/python3.7m",
"python.whl.impl.abi.tags": "cp37-cp37m",
}
elif version == "3.8":
variables = {
"python.manylinux.dir": "/opt/python/cp38-cp38",
"python.manylinux.include.dir": "/opt/python/cp38-cp38/include/python3.8",
"python.whl.impl.abi.tags": "cp38-cp38",
}
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))