From 783a4deec64067a8786d76e03228d1a64b986e57 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Sun, 8 Apr 2018 15:05:21 +0200 Subject: [PATCH] Symlinking python3 and pip3 to python and pip for OS X runs --- cibuildwheel/macos.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 71a5716d..b5c39961 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -51,9 +51,14 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be # install call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/']) + installation_bin_path = '/Library/Frameworks/Python.framework/Versions/{}/bin'.format(config.version) + if config.version[0] == '3': + os.symlink(os.path.join(installation_bin_path, 'python3'), os.path.join(installation_bin_path, 'python')) + os.symlink(os.path.join(installation_bin_path, 'pip3'), os.path.join(installation_bin_path, 'pip')) + env = os.environ.copy() env['PATH'] = os.pathsep.join([ - '/Library/Frameworks/Python.framework/Versions/%s/bin' % config.version, + installation_bin_path, env['PATH'], ]) env = environment.as_dictionary(prev_environment=env)