mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4201] [Other] setup: sycl/setup_intel.py started with the system Python runs again with .venv's (Permission denied on /usr/.strata-pip.json) #4946
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4946
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4201
Author: @andersson82
Created: 10/26/2026
Status: 🔄 Open
Base:
main← Head:setup-intel-use-venv📝 Commits (1)
4329ac1sycl: setup_intel.py started with the system Python runs again with .venv's (it wrote setup's pip stamp to /usr: Permission denied)📊 Changes
2 files changed (+40 additions, -0 deletions)
View changed files
📝
sycl/setup_intel.py(+13 -0)📝
tools/test_setup_sycl.py(+27 -0)📄 Description
Problem and result: if you run
python sycl/setup_intel.pydirectly, setup runs with the system Python. On Fedora 44 (Python 3.14, Arc 140T) it got to Step 3, ran pip and then stopped:pip_installwrites its stamp tosys.prefix, which is/usrfor the system Python. With this change the script runs itself again with.venv/bin/pythonwhen it is not in a virtual environment. If there is no.venv, it says to run./setup.sh --backend sycland exits. Inside a virtual environment, such as throughsetup.shor setup.py's--backend syclhand-off, which both use the.venvPython, nothing changes.Related discussion: none. I found no issue or PR about it.
Approach: a check in
sycl/setup_intel.py's__main__, beforeinstall().setup.pyis not changed, so the SYCL port stays out of the shared files. The check is not run at import, so the tests that import the module are not affected.Validation:
Passed:
.venv/bin/python tools/test_setup_sycl.pyon4329ac1d(Fedora 44, Python 3.14.8): 26 tests OK. The newUseVenvtest covers the hand-over to .venv, staying put inside a venv, and the message when there is no .venv.Passed:
python sycl/setup_intel.py --checkwith the system Python in a checkout without.venvprintsThis needs Strata's own Python environment. Run: ./setup.sh --backend sycl [setup's options]and exits 1.Passed: in a checkout with
.venv, starting the script with the system Python callsos.execvwith.venv/bin/python,sycl/setup_intel.pyand the same options. Checked withos.execvstubbed.Failed: none observed.
Not run: a full setup run to the end after the hand-over. No engine build was needed, because no C++/SYCL file changed.
Limits: this only finds
.venvin the checkout's root, the foldersetup.shcreates. Another virtual environment the user has activated is used as it is. Packages that the system Python's pip installed before this fix stay where pip put them (usually~/.local).🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.