fix: drop Python 2.7 on Windows using 2008 compiler

This commit is contained in:
Henry Schreiner
2021-04-25 00:55:16 -04:00
committed by Henry Schreiner
parent f27943608b
commit 22d473acc0
12 changed files with 21 additions and 57 deletions
+3 -3
View File
@@ -51,8 +51,8 @@ def test_pinned_versions(tmp_path, python_version):
if utils.platform == 'linux':
pytest.skip('linux doesn\'t pin individual tool versions, it pins manylinux images instead')
if utils.IS_WINDOWS_RUNNING_ON_TRAVIS and python_version == '2.7':
pytest.skip('Windows + Travis CI requires a workaround')
if utils.platform == 'windows' and python_version == '2.7':
pytest.skip('Windows requires a workaround')
is_running_on_macos_11_or_later = (
utils.platform == 'macos' and utils.get_macos_version() >= (10, 16)
@@ -123,7 +123,7 @@ def test_dependency_constraints_file(tmp_path, python_version):
if utils.platform == 'linux':
pytest.skip('linux doesn\'t pin individual tool versions, it pins manylinux images instead')
if utils.IS_WINDOWS_RUNNING_ON_TRAVIS and python_version == '2.7':
if utils.platform == 'windows' and python_version == '2.7':
pytest.skip('Windows + Travis CI requires a workaround')
project_dir = tmp_path / 'project'
+13 -16
View File
@@ -12,7 +12,18 @@ import sys
from contextlib import contextmanager
from tempfile import mkdtemp
IS_WINDOWS_RUNNING_ON_TRAVIS = os.environ.get('TRAVIS_OS_NAME') == 'windows'
platform: str
if 'CIBW_PLATFORM' in os.environ:
platform = os.environ['CIBW_PLATFORM']
elif sys.platform.startswith('linux'):
platform = 'linux'
elif sys.platform.startswith('darwin'):
platform = 'macos'
elif sys.platform in ['win32', 'cygwin']:
platform = 'windows'
else:
raise Exception('Unsupported platform')
# Python 2 does not have a tempfile.TemporaryDirectory context manager
@@ -91,7 +102,7 @@ def _get_arm64_macosx_deployment_target(macosx_deployment_target: str) -> str:
def expected_wheels(package_name, package_version, manylinux_versions=None,
macosx_deployment_target='10.9', machine_arch=None, *,
exclude_27=IS_WINDOWS_RUNNING_ON_TRAVIS):
exclude_27=platform == 'windows'):
'''
Returns a list of expected wheels from a run of cibuildwheel.
'''
@@ -187,17 +198,3 @@ def get_macos_version():
'''
version_str, _, _ = pm.mac_ver()
return tuple(map(int, version_str.split(".")[:2]))
platform = None
if 'CIBW_PLATFORM' in os.environ:
platform = os.environ['CIBW_PLATFORM']
elif sys.platform.startswith('linux'):
platform = 'linux'
elif sys.platform.startswith('darwin'):
platform = 'macos'
elif sys.platform in ['win32', 'cygwin']:
platform = 'windows'
else:
raise Exception('Unsupported platform')