2019-04-23 22:14:17 +01:00
|
|
|
import os
|
2019-11-12 23:51:27 +00:00
|
|
|
|
2019-04-22 18:22:43 +01:00
|
|
|
import utils
|
|
|
|
|
|
2019-11-12 23:51:27 +00:00
|
|
|
|
2019-04-22 18:22:43 +01:00
|
|
|
def test():
|
2019-04-22 23:13:34 +01:00
|
|
|
project_dir = os.path.dirname(__file__)
|
2019-04-23 22:14:17 +01:00
|
|
|
|
|
|
|
|
# build the wheels
|
2019-11-20 22:20:53 +01:00
|
|
|
actual_wheels = utils.cibuildwheel_run(project_dir, add_env={
|
2019-04-23 22:14:17 +01:00
|
|
|
# write python version information to a temporary file, this is
|
|
|
|
|
# checked in setup.py
|
2019-04-22 23:23:49 +01:00
|
|
|
'CIBW_BEFORE_BUILD': '''python -c "import sys; open('/tmp/pythonversion.txt', 'w').write(sys.version)" && python -c "import sys; open('/tmp/pythonexecutable.txt', 'w').write(sys.executable)"''',
|
|
|
|
|
'CIBW_BEFORE_BUILD_WINDOWS': '''python -c "import sys; open('c:\\pythonversion.txt', 'w').write(sys.version)" && python -c "import sys; open('c:\\pythonexecutable.txt', 'w').write(sys.executable)"''',
|
|
|
|
|
})
|
2019-11-20 22:20:53 +01:00
|
|
|
|
2019-04-23 22:14:17 +01:00
|
|
|
# also check that we got the right wheels
|
|
|
|
|
expected_wheels = utils.expected_wheels('spam', '0.1.0')
|
|
|
|
|
assert set(actual_wheels) == set(expected_wheels)
|