Skip to content

Commit 7f77aa8

Browse files
authored
Merge pull request #57 from mayeut/macos-update
macOS: Fix Pip bugs resulting from PyPI TLS 1.2 enforcement macOS: Fix brew python version
2 parents d6361c0 + 47873a9 commit 7f77aa8

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ matrix:
3232
- "PYTHON=python3"
3333
before_install:
3434
- brew update
35-
- brew install python3
35+
- brew outdated python || brew upgrade python
3636

3737
script:
3838
- |

cibuildwheel/macos.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@
1313
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, skip, environment):
1414
PythonConfiguration = namedtuple('PythonConfiguration', ['version', 'identifier', 'url'])
1515
python_configurations = [
16-
PythonConfiguration(version='2.7', identifier='cp27-macosx_10_6_intel', url='https://www.python.org/ftp/python/2.7.13/python-2.7.13-macosx10.6.pkg'),
16+
PythonConfiguration(version='2.7', identifier='cp27-macosx_10_6_intel', url='https://www.python.org/ftp/python/2.7.14/python-2.7.14-macosx10.6.pkg'),
1717
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.3/python-3.5.3-macosx10.6.pkg'),
19-
PythonConfiguration(version='3.6', identifier='cp36-macosx_10_6_intel', url='https://www.python.org/ftp/python/3.6.0/python-3.6.0-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.5/python-3.6.5-macosx10.6.pkg'),
2020
]
21+
get_pip_url = 'https://bootstrap.pypa.io/get-pip.py'
22+
get_pip_script = '/tmp/get-pip.py'
2123

2224
pkgs_output = subprocess.check_output(['pkgutil', '--pkgs'])
2325
if sys.version_info[0] >= 3:
@@ -35,6 +37,9 @@ def call(args, env=None, cwd=None, shell=False):
3537

3638
abs_project_dir = os.path.abspath(project_dir)
3739

40+
# get latest pip once and for all
41+
call(['curl', '-L', '-o', get_pip_script, get_pip_url])
42+
3843
for config in python_configurations:
3944
if skip(config.identifier):
4045
print('cibuildwheel: Skipping build %s' % config.identifier, file=sys.stderr)
@@ -63,7 +68,7 @@ def call(args, env=None, cwd=None, shell=False):
6368
call([python, '--version'], env=env)
6469

6570
# install pip & wheel
66-
call([python, '-m', 'ensurepip', '--upgrade'], env=env)
71+
call([python, get_pip_script, '--no-setuptools', '--no-wheel'], env=env)
6772
call([pip, '--version'], env=env)
6873
call([pip, 'install', 'wheel'], env=env)
6974
call([pip, 'install', 'delocate'], env=env)

0 commit comments

Comments
 (0)