From 5e009e53c9dc7462e5f55f8f3fcad99073b0f6cb Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Sun, 8 Apr 2018 15:12:43 +0200 Subject: [PATCH] Symlinking only on first-time installation of Python versions on mac OS X --- cibuildwheel/macos.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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([