diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index b5c39961..6829e835 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -45,16 +45,16 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be # if this version of python isn't installed, get it from python.org and install python_package_identifier = 'org.python.Python.PythonFramework-%s' % config.version + installation_bin_path = '/Library/Frameworks/Python.framework/Versions/{}/bin'.format(config.version) if python_package_identifier not in installed_system_packages: # download the pkg call(['curl', '-L', '-o', '/tmp/Python.pkg', config.url]) # 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')) + 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([