packaging: ignore craftctl python environment variables
Metadata
Current evaluation
Merged #3791 in commit c2b53e675 (change ec5599d34), running craftctl with Python’s -E option to ignore PYTHONPATH and PYTHONHOME and prevent unintended module loading.
Resolution: closed resolved
Reason: The approved packaging change was merged via commit c2b53e675, with implementation commit ec5599d34. It isolates craftctl from Python environment variables that could redirect module loading.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Run craftctl with the `-E` option to the Python interpreter so that
environment varables such as `PYTHONPATH` and `PYTHONHOME` are ignored,
preventing craftctl modules to be read from non-standard locations.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `make lint`?
- [ ] Have you successfully run `pytest tests/unit`?
-----
CRAFT-1118
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #3791 in commit c2b53e675 (change ec5599d34), running craftctl with Python’s -E option to ignore PYTHONPATH and PYTHONHOME and prevent unintended module loading. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged #3791 via ec5599d34 to invoke craftctl with Python -E, ignoring PYTHONPATH/PYTHONHOME so modules cannot load from non-standard locations. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged. Adds the -E flag to the Python interpreter when invoking craftctl, ignoring PYTHONPATH and PYTHONHOME to prevent loading modules from non-standard locations. Approved by reviewer and passed all CI checks. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Passes the -E flag to Python when executing craftctl to ignore PYTHONPATH and PYTHONHOME, preventing module loading from non-standard locations. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.