2019-04-23 22:14:17 +01:00
import os , pytest
2019-04-22 18:22:43 +01:00
import utils
def test ():
2019-04-22 23:13:34 +01:00
project_dir = os . path . dirname ( __file__ )
2019-04-22 23:25:14 +01:00
if utils . platform != 'linux' :
2019-08-27 16:03:09 +02:00
pytest . skip ( 'the test is only relevant to the linux build' )
2019-04-22 18:22:43 +01:00
2019-04-23 22:23:54 +01:00
utils . cibuildwheel_run ( project_dir , add_env = {
2019-08-18 00:42:35 +02:00
'CIBW_MANYLINUX_X86_64_IMAGE' : 'dockcross/manylinux2010-x64' ,
'CIBW_MANYLINUX_I686_IMAGE' : 'dockcross/manylinux1-x86' ,
'CIBW_BEFORE_BUILD' : '/opt/python/cp36-cp36m/bin/pip install -U auditwheel' , # Currently necessary on dockcross images to get auditwheel 2.1 supporting AUDITWHEEL_PLAT
'CIBW_ENVIRONMENT' : 'AUDITWHEEL_PLAT=`if [ $(uname -i) == "x86_64" ]; then echo "manylinux2010_x86_64"; else echo "manylinux1_i686"; fi`' ,
2019-04-22 23:23:49 +01:00
})
2019-04-22 18:22:43 +01:00
2019-04-23 22:14:17 +01:00
# also check that we got the right wheels built
2019-10-16 00:30:17 +02:00
expected_wheels = [ w for w in utils . expected_wheels ( 'spam' , '0.1.0' )
if '-manylinux2010_i686' not in w ]
2019-04-23 22:14:17 +01:00
actual_wheels = os . listdir ( 'wheelhouse' )
assert set ( actual_wheels ) == set ( expected_wheels )