From 1bfe6d45bd6e6cd849ff411b67a86a58a76cd78c Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Sun, 10 Mar 2019 23:07:14 +0000 Subject: [PATCH] Add auto-detect platform for Azure --- cibuildwheel/__main__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 6d0b1c94..f5b3341b 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -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, '