Skip to content

Commit bac8cc9

Browse files
tbitcsoz-agent
andcommitted
fix: set PYTHONDONTWRITEBYTECODE=1 in container to prevent root-owned __pycache__
Python inside the container writes __pycache__/*.pyc as root (container user). This causes PermissionError during tempfile cleanup in CI docker integration tests. Setting PYTHONDONTWRITEBYTECODE=1 suppresses .pyc generation entirely, which is appropriate for a build-tool container that has no need for bytecode caching. Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent d6d209d commit bac8cc9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

west_env/container.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def _container_args(cfg, command, interactive=False, workspace=None, host_cwd=No
4848
container_wd,
4949
"-e",
5050
"PYTHONPATH=/work/modules/west-env",
51+
"-e",
52+
"PYTHONDONTWRITEBYTECODE=1",
5153
]
5254

5355
if interactive:

0 commit comments

Comments
 (0)