We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MacOS travis-ci build stalls
I noticed today that our MacOS travis-CI build using cibuildwheel has started stalling at the following point of the cibuildwheel setup:

```bash
+ pip install --upgrade setuptools
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl (573kB)
Installing collected packages: setuptools
  Found existing installation: setuptools 28.8.0
    Uninstalling setuptools-28.8.0:

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated
```

This hasn't affected our Windows/Linux builds, and no changes to our devops pipeline has occurred (and even then, only superficial Python commits in our codebase were committed). 

This issue happens no matter how many times we restart the build, and seems odd - this step is usually instantaneous on previous Mac cibuildwheel builds.

Since this is a command that is called by cibuildwheel, has there been a recent change that breaks this step?

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `cibuildwheel/macos.py`
Content:
```
1 from __future__ import print_function
2 import os, subprocess, shlex, sys, shutil
3 from collections import namedtuple
4 from glob import glob
5 try:
6     from shlex import quote as shlex_quote
7 except ImportError:
8     from pipes import quote as shlex_quote
9 
10 from .util import prepare_command, get_build_verbosity_extra_flags
11 
12 
13 def build(project_dir, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment):
14     PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'identifier', 'url'])
15     python_configurations = [
16         PythonConfiguration(version='2.7', identifier='cp27-macosx_10_6_intel', url='https://www.python.org/ftp/python/2.7.15/python-2.7.15-macosx10.6.pkg'),
17         PythonConfiguration(version='3.4', identifier='cp34-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.4.4/python-3.4.4-macosx10.6.pkg'),
18         PythonConfiguration(version='3.5', identifier='cp35-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.5.4/python-3.5.4-macosx10.6.pkg'),
19         PythonConfiguration(version='3.6', identifier='cp36-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.6.pkg'),
20         PythonConfiguration(version='3.7', identifier='cp37-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.7.2/python-3.7.2-macosx10.6.pkg'),
21     ]
22     get_pip_url = 'https://bootstrap.pypa.io/get-pip.py'
23     get_pip_script = '/tmp/get-pip.py'
24 
25     pkgs_output = subprocess.check_output(['pkgutil',  '--pkgs'])
26     if sys.version_info[0] >= 3:
27         pkgs_output = pkgs_output.decode('utf8')
28     installed_system_packages = pkgs_output.splitlines()
29 
30     def call(args, env=None, cwd=None, shell=False):
31         # print the command executing for the logs
32         if shell:
33             print('+ %s' % args)
34         else:
35             print('+ ' + ' '.join(shlex_quote(a) for a in args))
36 
37         return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)
38 
39     abs_project_dir = os.path.abspath(project_dir)
40 
41     # get latest pip once and for all
42     call(['curl', '-L', '-o', get_pip_script, get_pip_url])
43 
44     for config in python_configurations:
45         if not build_selector(config.identifier):
46             print('cibuildwheel: Skipping build %s' % config.identifier, file=sys.stderr)
47             continue
48 
49         # if this version of python isn't installed, get it from python.org and install
50         python_package_identifier = 'org.python.Python.PythonFramework-%s' % config.version
51         if python_package_identifier not in installed_system_packages:
52             # download the pkg
53             call(['curl', '-L', '-o', '/tmp/Python.pkg', config.url])
54             # install
55             call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/'])
56             # patch open ssl
57             if config.version in ('3.4', '3.5'):
58                 call(['curl', '-fsSLo', '/tmp/python-patch.tar.gz', 'https://github.com/mayeut/patch-macos-python-openssl/releases/download/v1.0.2q/patch-macos-python-%s-openssl-v1.0.2q.tar.gz' % config.version])
59                 call(['sudo', 'tar', '-C', '/Library/Frameworks/Python.framework/Versions/%s/' % config.version, '-xmf', '/tmp/python-patch.tar.gz'])
60 
61         installation_bin_path = '/Library/Frameworks/Python.framework/Versions/{}/bin'.format(config.version)
62 
63         # Python bin folders on Mac don't symlink python3 to python, so we do that
64         # so `python` and `pip` always point to the active configuration.
65         if os.path.exists('/tmp/cibw_bin'):
66             shutil.rmtree('/tmp/cibw_bin')
67         os.makedirs('/tmp/cibw_bin')
68 
69         if config.version[0] == '3':
70             os.symlink(os.path.join(installation_bin_path, 'python3'), '/tmp/cibw_bin/python')
71             os.symlink(os.path.join(installation_bin_path, 'python3-config'), '/tmp/cibw_bin/python-config')
72             os.symlink(os.path.join(installation_bin_path, 'pip3'), '/tmp/cibw_bin/pip')
73 
74         env = os.environ.copy()
75         env['PATH'] = os.pathsep.join([
76             '/tmp/cibw_bin',
77             installation_bin_path,
78             env['PATH'],
79         ])
80         env = environment.as_dictionary(prev_environment=env)
81 
82         # check what version we're on
83         call(['which', 'python'], env=env)
84         call(['python', '--version'], env=env)
85 
86         # install pip & wheel
87         call(['python', get_pip_script, '--no-setuptools', '--no-wheel'], env=env)
88         call(['pip', '--version'], env=env)
89         # sudo required, because the removal of the old version of setuptools might cause problems with newer pip versions (see issue #122)
90         call(['sudo', 'pip', 'install', '--upgrade', 'setuptools'], env=env)
91         call(['pip', 'install', 'wheel'], env=env)
92         call(['pip', 'install', 'delocate'], env=env)
93 
94         # setup dirs
95         if os.path.exists('/tmp/built_wheel'):
96             shutil.rmtree('/tmp/built_wheel')
97         os.makedirs('/tmp/built_wheel')
98         if os.path.exists('/tmp/delocated_wheel'):
99             shutil.rmtree('/tmp/delocated_wheel')
100         os.makedirs('/tmp/delocated_wheel')
101 
102         # run the before_build command
103         if before_build:
104             before_build_prepared = prepare_command(before_build, project=abs_project_dir)
105             call(before_build_prepared, env=env, shell=True)
106 
107         # build the wheel
108         call(['pip', 'wheel', abs_project_dir, '-w', '/tmp/built_wheel', '--no-deps'] + get_build_verbosity_extra_flags(build_verbosity), env=env)
109         built_wheel = glob('/tmp/built_wheel/*.whl')[0]
110 
111         if built_wheel.endswith('none-any.whl'):
112             # pure python wheel - just move
113             shutil.move(built_wheel, '/tmp/delocated_wheel')
114         else:
115             # list the dependencies
116             call(['delocate-listdeps', built_wheel], env=env)
117             # rebuild the wheel with shared libraries included and place in output dir
118             call(['delocate-wheel', '-w', '/tmp/delocated_wheel', built_wheel], env=env)
119         delocated_wheel = glob('/tmp/delocated_wheel/*.whl')[0]
120 
121         # install the wheel
122         call(['pip', 'install', delocated_wheel], env=env)
123 
124         # test the wheel
125         if test_requires:
126             call(['pip', 'install'] + test_requires, env=env)
127         if test_command:
128             # run the tests from $HOME, with an absolute path in the command
129             # (this ensures that Python runs the tests against the installed wheel
130             # and not the repo code)
131             test_command_prepared = prepare_command(test_command, project=abs_project_dir)
132             call(test_command_prepared, cwd=os.environ['HOME'], env=env, shell=True)
133 
134         # we're all done here; move it to output (overwrite existing)
135         dst = os.path.join(output_dir, os.path.basename(delocated_wheel))
136         shutil.move(delocated_wheel, dst)
137
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py
--- a/cibuildwheel/macos.py
+++ b/cibuildwheel/macos.py
@@ -86,8 +86,7 @@
         # install pip & wheel
         call(['python', get_pip_script, '--no-setuptools', '--no-wheel'], env=env)
         call(['pip', '--version'], 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', '--upgrade', 'setuptools'], env=env)
         call(['pip', 'install', 'wheel'], env=env)
         call(['pip', 'install', 'delocate'], env=env)

{"golden_diff": "diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py\n--- a/cibuildwheel/macos.py\n+++ b/cibuildwheel/macos.py\n@@ -86,8 +86,7 @@\n         # install pip & wheel\n         call(['python', get_pip_script, '--no-setuptools', '--no-wheel'], env=env)\n         call(['pip', '--version'], env=env)\n-        # sudo required, because the removal of the old version of setuptools might cause problems with newer pip versions (see issue #122)\n-        call(['sudo', 'pip', 'install', '--upgrade', 'setuptools'], env=env)\n+        call(['pip', 'install', '--upgrade', 'setuptools'], env=env)\n         call(['pip', 'install', 'wheel'], env=env)\n         call(['pip', 'install', 'delocate'], env=env)\n", "issue": "MacOS travis-ci build stalls\nI noticed today that our MacOS travis-CI build using cibuildwheel has started stalling at the following point of the cibuildwheel setup:\r\n\r\n```bash\r\n+ pip install --upgrade setuptools\r\nCollecting setuptools\r\n  Downloading https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl (573kB)\r\nInstalling collected packages: setuptools\r\n  Found existing installation: setuptools 28.8.0\r\n    Uninstalling setuptools-28.8.0:\r\n\r\nNo output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.\r\nCheck the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received\r\nThe build has been terminated\r\n```\r\n\r\nThis hasn't affected our Windows/Linux builds, and no changes to our devops pipeline has occurred (and even then, only superficial Python commits in our codebase were committed). \r\n\r\nThis issue happens no matter how many times we restart the build, and seems odd - this step is usually instantaneous on previous Mac cibuildwheel builds.\r\n\r\nSince this is a command that is called by cibuildwheel, has there been a recent change that breaks this step?\n", "before_files": [{"content": "from __future__ import print_function\nimport os, subprocess, shlex, sys, shutil\nfrom collections import namedtuple\nfrom glob import glob\ntry:\n    from shlex import quote as shlex_quote\nexcept ImportError:\n    from pipes import quote as shlex_quote\n\nfrom .util import prepare_command, get_build_verbosity_extra_flags\n\n\ndef build(project_dir, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment):\n    PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'identifier', 'url'])\n    python_configurations = [\n        PythonConfiguration(version='2.7', identifier='cp27-macosx_10_6_intel', url='https://www.python.org/ftp/python/2.7.15/python-2.7.15-macosx10.6.pkg'),\n        PythonConfiguration(version='3.4', identifier='cp34-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.4.4/python-3.4.4-macosx10.6.pkg'),\n        PythonConfiguration(version='3.5', identifier='cp35-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.5.4/python-3.5.4-macosx10.6.pkg'),\n        PythonConfiguration(version='3.6', identifier='cp36-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.6.pkg'),\n        PythonConfiguration(version='3.7', identifier='cp37-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.7.2/python-3.7.2-macosx10.6.pkg'),\n    ]\n    get_pip_url = 'https://bootstrap.pypa.io/get-pip.py'\n    get_pip_script = '/tmp/get-pip.py'\n\n    pkgs_output = subprocess.check_output(['pkgutil',  '--pkgs'])\n    if sys.version_info[0] >= 3:\n        pkgs_output = pkgs_output.decode('utf8')\n    installed_system_packages = pkgs_output.splitlines()\n\n    def call(args, env=None, cwd=None, shell=False):\n        # print the command executing for the logs\n        if shell:\n            print('+ %s' % args)\n        else:\n            print('+ ' + ' '.join(shlex_quote(a) for a in args))\n\n        return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)\n\n    abs_project_dir = os.path.abspath(project_dir)\n\n    # get latest pip once and for all\n    call(['curl', '-L', '-o', get_pip_script, get_pip_url])\n\n    for config in python_configurations:\n        if not build_selector(config.identifier):\n            print('cibuildwheel: Skipping build %s' % config.identifier, file=sys.stderr)\n            continue\n\n        # if this version of python isn't installed, get it from python.org and install\n        python_package_identifier = 'org.python.Python.PythonFramework-%s' % config.version\n        if python_package_identifier not in installed_system_packages:\n            # download the pkg\n            call(['curl', '-L', '-o', '/tmp/Python.pkg', config.url])\n            # install\n            call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/'])\n            # patch open ssl\n            if config.version in ('3.4', '3.5'):\n                call(['curl', '-fsSLo', '/tmp/python-patch.tar.gz', 'https://github.com/mayeut/patch-macos-python-openssl/releases/download/v1.0.2q/patch-macos-python-%s-openssl-v1.0.2q.tar.gz' % config.version])\n                call(['sudo', 'tar', '-C', '/Library/Frameworks/Python.framework/Versions/%s/' % config.version, '-xmf', '/tmp/python-patch.tar.gz'])\n\n        installation_bin_path = '/Library/Frameworks/Python.framework/Versions/{}/bin'.format(config.version)\n\n        # Python bin folders on Mac don't symlink python3 to python, so we do that\n        # so `python` and `pip` always point to the active configuration.\n        if os.path.exists('/tmp/cibw_bin'):\n            shutil.rmtree('/tmp/cibw_bin')\n        os.makedirs('/tmp/cibw_bin')\n\n        if config.version[0] == '3':\n            os.symlink(os.path.join(installation_bin_path, 'python3'), '/tmp/cibw_bin/python')\n            os.symlink(os.path.join(installation_bin_path, 'python3-config'), '/tmp/cibw_bin/python-config')\n            os.symlink(os.path.join(installation_bin_path, 'pip3'), '/tmp/cibw_bin/pip')\n\n        env = os.environ.copy()\n        env['PATH'] = os.pathsep.join([\n            '/tmp/cibw_bin',\n            installation_bin_path,\n            env['PATH'],\n        ])\n        env = environment.as_dictionary(prev_environment=env)\n\n        # check what version we're on\n        call(['which', 'python'], env=env)\n        call(['python', '--version'], env=env)\n\n        # install pip & wheel\n        call(['python', get_pip_script, '--no-setuptools', '--no-wheel'], env=env)\n        call(['pip', '--version'], env=env)\n        # sudo required, because the removal of the old version of setuptools might cause problems with newer pip versions (see issue #122)\n        call(['sudo', 'pip', 'install', '--upgrade', 'setuptools'], env=env)\n        call(['pip', 'install', 'wheel'], env=env)\n        call(['pip', 'install', 'delocate'], env=env)\n\n        # setup dirs\n        if os.path.exists('/tmp/built_wheel'):\n            shutil.rmtree('/tmp/built_wheel')\n        os.makedirs('/tmp/built_wheel')\n        if os.path.exists('/tmp/delocated_wheel'):\n            shutil.rmtree('/tmp/delocated_wheel')\n        os.makedirs('/tmp/delocated_wheel')\n\n        # run the before_build command\n        if before_build:\n            before_build_prepared = prepare_command(before_build, project=abs_project_dir)\n            call(before_build_prepared, env=env, shell=True)\n\n        # build the wheel\n        call(['pip', 'wheel', abs_project_dir, '-w', '/tmp/built_wheel', '--no-deps'] + get_build_verbosity_extra_flags(build_verbosity), env=env)\n        built_wheel = glob('/tmp/built_wheel/*.whl')[0]\n\n        if built_wheel.endswith('none-any.whl'):\n            # pure python wheel - just move\n            shutil.move(built_wheel, '/tmp/delocated_wheel')\n        else:\n            # list the dependencies\n            call(['delocate-listdeps', built_wheel], env=env)\n            # rebuild the wheel with shared libraries included and place in output dir\n            call(['delocate-wheel', '-w', '/tmp/delocated_wheel', built_wheel], env=env)\n        delocated_wheel = glob('/tmp/delocated_wheel/*.whl')[0]\n\n        # install the wheel\n        call(['pip', 'install', delocated_wheel], env=env)\n\n        # test the wheel\n        if test_requires:\n            call(['pip', 'install'] + test_requires, env=env)\n        if test_command:\n            # run the tests from $HOME, with an absolute path in the command\n            # (this ensures that Python runs the tests against the installed wheel\n            # and not the repo code)\n            test_command_prepared = prepare_command(test_command, project=abs_project_dir)\n            call(test_command_prepared, cwd=os.environ['HOME'], env=env, shell=True)\n\n        # we're all done here; move it to output (overwrite existing)\n        dst = os.path.join(output_dir, os.path.basename(delocated_wheel))\n        shutil.move(delocated_wheel, dst)\n", "path": "cibuildwheel/macos.py"}], "after_files": [{"content": "from __future__ import print_function\nimport os, subprocess, shlex, sys, shutil\nfrom collections import namedtuple\nfrom glob import glob\ntry:\n    from shlex import quote as shlex_quote\nexcept ImportError:\n    from pipes import quote as shlex_quote\n\nfrom .util import prepare_command, get_build_verbosity_extra_flags\n\n\ndef build(project_dir, output_dir, test_command, test_requires, before_build, build_verbosity, build_selector, environment):\n    PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'identifier', 'url'])\n    python_configurations = [\n        PythonConfiguration(version='2.7', identifier='cp27-macosx_10_6_intel', url='https://www.python.org/ftp/python/2.7.15/python-2.7.15-macosx10.6.pkg'),\n        PythonConfiguration(version='3.4', identifier='cp34-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.4.4/python-3.4.4-macosx10.6.pkg'),\n        PythonConfiguration(version='3.5', identifier='cp35-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.5.4/python-3.5.4-macosx10.6.pkg'),\n        PythonConfiguration(version='3.6', identifier='cp36-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.6.8/python-3.6.8-macosx10.6.pkg'),\n        PythonConfiguration(version='3.7', identifier='cp37-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.7.2/python-3.7.2-macosx10.6.pkg'),\n    ]\n    get_pip_url = 'https://bootstrap.pypa.io/get-pip.py'\n    get_pip_script = '/tmp/get-pip.py'\n\n    pkgs_output = subprocess.check_output(['pkgutil',  '--pkgs'])\n    if sys.version_info[0] >= 3:\n        pkgs_output = pkgs_output.decode('utf8')\n    installed_system_packages = pkgs_output.splitlines()\n\n    def call(args, env=None, cwd=None, shell=False):\n        # print the command executing for the logs\n        if shell:\n            print('+ %s' % args)\n        else:\n            print('+ ' + ' '.join(shlex_quote(a) for a in args))\n\n        return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)\n\n    abs_project_dir = os.path.abspath(project_dir)\n\n    # get latest pip once and for all\n    call(['curl', '-L', '-o', get_pip_script, get_pip_url])\n\n    for config in python_configurations:\n        if not build_selector(config.identifier):\n            print('cibuildwheel: Skipping build %s' % config.identifier, file=sys.stderr)\n            continue\n\n        # if this version of python isn't installed, get it from python.org and install\n        python_package_identifier = 'org.python.Python.PythonFramework-%s' % config.version\n        if python_package_identifier not in installed_system_packages:\n            # download the pkg\n            call(['curl', '-L', '-o', '/tmp/Python.pkg', config.url])\n            # install\n            call(['sudo', 'installer', '-pkg', '/tmp/Python.pkg', '-target', '/'])\n            # patch open ssl\n            if config.version in ('3.4', '3.5'):\n                call(['curl', '-fsSLo', '/tmp/python-patch.tar.gz', 'https://github.com/mayeut/patch-macos-python-openssl/releases/download/v1.0.2q/patch-macos-python-%s-openssl-v1.0.2q.tar.gz' % config.version])\n                call(['sudo', 'tar', '-C', '/Library/Frameworks/Python.framework/Versions/%s/' % config.version, '-xmf', '/tmp/python-patch.tar.gz'])\n\n        installation_bin_path = '/Library/Frameworks/Python.framework/Versions/{}/bin'.format(config.version)\n\n        # Python bin folders on Mac don't symlink python3 to python, so we do that\n        # so `python` and `pip` always point to the active configuration.\n        if os.path.exists('/tmp/cibw_bin'):\n            shutil.rmtree('/tmp/cibw_bin')\n        os.makedirs('/tmp/cibw_bin')\n\n        if config.version[0] == '3':\n            os.symlink(os.path.join(installation_bin_path, 'python3'), '/tmp/cibw_bin/python')\n            os.symlink(os.path.join(installation_bin_path, 'python3-config'), '/tmp/cibw_bin/python-config')\n            os.symlink(os.path.join(installation_bin_path, 'pip3'), '/tmp/cibw_bin/pip')\n\n        env = os.environ.copy()\n        env['PATH'] = os.pathsep.join([\n            '/tmp/cibw_bin',\n            installation_bin_path,\n            env['PATH'],\n        ])\n        env = environment.as_dictionary(prev_environment=env)\n\n        # check what version we're on\n        call(['which', 'python'], env=env)\n        call(['python', '--version'], env=env)\n\n        # install pip & wheel\n        call(['python', get_pip_script, '--no-setuptools', '--no-wheel'], env=env)\n        call(['pip', '--version'], env=env)\n        call(['pip', 'install', '--upgrade', 'setuptools'], env=env)\n        call(['pip', 'install', 'wheel'], env=env)\n        call(['pip', 'install', 'delocate'], env=env)\n\n        # setup dirs\n        if os.path.exists('/tmp/built_wheel'):\n            shutil.rmtree('/tmp/built_wheel')\n        os.makedirs('/tmp/built_wheel')\n        if os.path.exists('/tmp/delocated_wheel'):\n            shutil.rmtree('/tmp/delocated_wheel')\n        os.makedirs('/tmp/delocated_wheel')\n\n        # run the before_build command\n        if before_build:\n            before_build_prepared = prepare_command(before_build, project=abs_project_dir)\n            call(before_build_prepared, env=env, shell=True)\n\n        # build the wheel\n        call(['pip', 'wheel', abs_project_dir, '-w', '/tmp/built_wheel', '--no-deps'] + get_build_verbosity_extra_flags(build_verbosity), env=env)\n        built_wheel = glob('/tmp/built_wheel/*.whl')[0]\n\n        if built_wheel.endswith('none-any.whl'):\n            # pure python wheel - just move\n            shutil.move(built_wheel, '/tmp/delocated_wheel')\n        else:\n            # list the dependencies\n            call(['delocate-listdeps', built_wheel], env=env)\n            # rebuild the wheel with shared libraries included and place in output dir\n            call(['delocate-wheel', '-w', '/tmp/delocated_wheel', built_wheel], env=env)\n        delocated_wheel = glob('/tmp/delocated_wheel/*.whl')[0]\n\n        # install the wheel\n        call(['pip', 'install', delocated_wheel], env=env)\n\n        # test the wheel\n        if test_requires:\n            call(['pip', 'install'] + test_requires, env=env)\n        if test_command:\n            # run the tests from $HOME, with an absolute path in the command\n            # (this ensures that Python runs the tests against the installed wheel\n            # and not the repo code)\n            test_command_prepared = prepare_command(test_command, project=abs_project_dir)\n            call(test_command_prepared, cwd=os.environ['HOME'], env=env, shell=True)\n\n        # we're all done here; move it to output (overwrite existing)\n        dst = os.path.join(output_dir, os.path.basename(delocated_wheel))\n        shutil.move(delocated_wheel, dst)\n", "path": "cibuildwheel/macos.py"}]}