diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 5ef450a1d..c85d95dfc 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -86,7 +86,8 @@ def call(args, env=None, cwd=None, shell=False): # install pip & wheel call(['python', get_pip_script, '--no-setuptools', '--no-wheel'], env=env) call(['pip', '--version'], env=env) - call(['pip', 'install', '--upgrade', 'setuptools'], env=env) + # sudo required, because the removal of the old version of setuptools might cause problems with newer pip versions (see issue #122) + call(['sudo', 'pip', 'install', '--upgrade', 'setuptools'], env=env) call(['pip', 'install', 'wheel'], env=env) call(['pip', 'install', 'delocate'], env=env) @@ -118,11 +119,11 @@ def call(args, env=None, cwd=None, shell=False): delocated_wheel = glob('/tmp/delocated_wheel/*.whl')[0] # install the wheel - call(['pip', 'install', delocated_wheel], env=env) + call(['pip', 'install', '--user', delocated_wheel], env=env) # test the wheel if test_requires: - call(['pip', 'install'] + test_requires, env=env) + call(['pip', 'install', '--user'] + test_requires, env=env) if test_command: # run the tests from $HOME, with an absolute path in the command # (this ensures that Python runs the tests against the installed wheel