Neaten the environment modification using triple-quotes and dict.update

This commit is contained in:
Joe Rickerby
2019-04-22 23:23:49 +01:00
parent 857aafbd3f
commit 9050137d2b
5 changed files with 23 additions and 13 deletions
+4 -2
View File
@@ -10,8 +10,10 @@ def test():
# write some information into the CIBW_ENVIRONMENT, for expansion and
# insertion into the environment by cibuildwheel. This is checked
# in setup.py
env['CIBW_ENVIRONMENT'] = 'CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo \'test string 3\')" PATH=$PATH:/opt/cibw_test_path'
env['CIBW_ENVIRONMENT_WINDOWS'] = 'CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo \'test string 3\')" PATH="$PATH;/opt/cibw_test_path"'
env.update({
'CIBW_ENVIRONMENT': '''CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo 'test string 3')" PATH=$PATH:/opt/cibw_test_path''',
'CIBW_ENVIRONMENT_WINDOWS': '''CIBW_TEST_VAR="a b c" CIBW_TEST_VAR_2=1 CIBW_TEST_VAR_3="$(echo 'test string 3')" PATH="$PATH;/opt/cibw_test_path"''',
})
# build the wheels
subprocess.check_call([sys.executable, '-m', 'cibuildwheel', project_dir], env=env)