Add auto-detect platform for Azure

This commit is contained in:
Joe Rickerby
2019-03-10 23:07:14 +00:00
parent aefde9535b
commit 1bfe6d45bd
+7
View File
@@ -68,6 +68,13 @@ def main():
platform = 'linux'
elif sys.platform.startswith('darwin'):
platform = 'macos'
elif 'AZURE_HTTP_USER_AGENT' in os.environ:
if os.environ['AGENT_OS'] == 'Linux':
platform = 'linux'
elif os.environ['AGENT_OS'] == 'Darwin':
platform = 'macos'
elif os.environ['AGENT_OD'] == 'Windows_NT':
platform = 'windows'
if platform is None:
print('cibuildwheel: Unable to detect platform. cibuildwheel should run on your CI server, '