add environment evaluation

This commit is contained in:
Grzegorz Bokota
2020-06-22 13:55:04 +02:00
parent 3fe560cf14
commit c1f155c0f2
6 changed files with 24 additions and 5 deletions
+2 -1
View File
@@ -13,7 +13,8 @@ def test():
actual_wheels = utils.cibuildwheel_run(project_dir, add_env={
# write python version information to a temporary file, this is
# checked in setup.py
'CIBW_BEFORE_ALL': '''python -c "open('{project}/text_info.txt', 'w').write('sample text')"''',
'CIBW_BEFORE_ALL': '''python -c "import os;open('{project}/text_info.txt', 'w').write('sample text '+os.environ.get('TEST_VAL', ''))"''',
'CIBW_ENVIRONMENT': "TEST_VAL='123'"
})
# also check that we got the right wheels
+1 -1
View File
@@ -9,7 +9,7 @@ with open("text_info.txt") as f:
stored_text = f.read()
print("## stored text: " + stored_text)
assert stored_text == "sample text"
assert stored_text == "sample text 123"
setup(