7
7
project_dir = os .path .dirname (__file__ )
8
8
9
9
10
- def test_cpp11 (tmp_path ):
10
+ def test_cpp11 ():
11
11
# This test checks that the C++11 standard is supported
12
12
13
13
# VC++ for Python 2.7 does not support modern standards
@@ -56,16 +56,16 @@ def test_cpp17():
56
56
assert set (actual_wheels ) == set (expected_wheels )
57
57
58
58
59
- def test_cpp17_modern_msvc_workaround ( tmp_path ):
60
- # This test checks the workaround for modern C++ versions, using a modern compiler
59
+ def test_cpp17_py27_modern_msvc_workaround ( ):
60
+ # This test checks the workaround for building Python 2.7 wheel with MSVC 14
61
61
62
62
if utils .platform != 'windows' :
63
63
pytest .skip ('the test is only relevant to the Windows build' )
64
64
65
65
if os .environ .get ('APPVEYOR_BUILD_WORKER_IMAGE' , '' ) == 'Visual Studio 2015' :
66
66
pytest .skip ('Visual Studio 2015 does not support C++17' )
67
67
68
- # VC++ for Python 2.7 and MSVC 10 do not support modern standards
68
+ # VC++ for Python 2.7 (i.e., MSVC 9) does not support modern standards
69
69
# This is a workaround which forces distutils/setupstools to a newer version
70
70
# Wheels compiled need a more modern C++ redistributable installed, which is not
71
71
# included with Python: see documentation for more info
@@ -92,13 +92,15 @@ def add_vcvars(prev_env, platform):
92
92
return env
93
93
94
94
add_env_x86 = add_vcvars (add_env , 'x86' )
95
- add_env_x86 ['CIBW_BUILD' ] = '* -win32'
95
+ add_env_x86 ['CIBW_BUILD' ] = '?p27 -win32'
96
96
actual_wheels = utils .cibuildwheel_run (project_dir , add_env = add_env_x86 )
97
97
98
98
add_env_x64 = add_vcvars (add_env , 'x64' )
99
- add_env_x64 ['CIBW_BUILD' ] = '* -win_amd64'
99
+ add_env_x64 ['CIBW_BUILD' ] = 'cp27 -win_amd64'
100
100
actual_wheels += utils .cibuildwheel_run (project_dir , add_env = add_env_x64 )
101
101
102
- expected_wheels = utils .expected_wheels ('spam' , '0.1.0' )
102
+ expected_wheels = [w for w in utils .expected_wheels ('spam' , '0.1.0' )
103
+ if 'cp27-cp27m-win' in w
104
+ or 'pp27-pypy_73-win32' in w ]
103
105
104
106
assert set (actual_wheels ) == set (expected_wheels )
0 commit comments