Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cibuildwheel/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def build(options: BuildOptions) -> None:

if options.before_all:
env = docker.get_environment()
env['PATH'] = f'/opt/python/cp38-cp38:{env["PATH"]}'
env['PATH'] = f'/opt/python/cp38-cp38/bin:{env["PATH"]}'
env = options.environment.as_dictionary(env, executor=docker.environment_executor)

before_all_prepared = prepare_command(options.before_all, project=container_project_path, package=container_package_dir)
Expand Down
4 changes: 3 additions & 1 deletion test/test_before_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ def test(tmp_path):
print("dummy text", file=ff)

# build the wheels
before_all_command = '''python -c "import os;open('{project}/text_info.txt', 'w').write('sample text '+os.environ.get('TEST_VAL', ''))"'''
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 "import os;open('{project}/text_info.txt', 'w').write('sample text '+os.environ.get('TEST_VAL', ''))"''',
'CIBW_BEFORE_ALL': before_all_command,
'CIBW_BEFORE_ALL_LINUX': before_all_command + ''' && python -c "import sys; assert sys.version_info >= (3, 6)"''',
'CIBW_ENVIRONMENT': "TEST_VAL='123'"
})

Expand Down