Repository navigation
fix(python-setup): pass requirements.lock relative to the venv dir (macOS 'Application Support') - #403
Open
lion24 wants to merge 1 commit into
Open
fix(python-setup): pass requirements.lock relative to the venv dir (macOS 'Application Support')#403lion24 wants to merge 1 commit into
lion24 wants to merge 1 commit into
Conversation
On macOS the install dir is under ~/Library/Application Support, and uv 0.7.12 fails to read a lock file given by a path containing a space: uv pip install ... -c "/Users/x/Library/Application Support/com.fincept.terminal/venv-numpy2/requirements.lock" error: File not found: `/Users/x/Library/Application` so the Analytics Core lane exits with code 2 and setup cannot complete. Add an optional StepOptions::working_dir, run the core and full uv installs from the venv directory, and pass the lock as the bare file name. Other steps and the fallback path are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEHQTP7Ncz2n7m82sqyxon
Contributor
|
Hi @lion24 — thanks for the PR! Our automated scope gate flagged the following: ❌ No scope-approved linked issue. This PR must close an issue that carries one of: Please read CONTRIBUTING.md. Once an issue with the appropriate label exists and is linked here, re-run this check by pushing an empty commit or editing the PR description. A maintainer can also bypass this gate by adding the PRs that remain unresolved for 7 days will be closed automatically. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scope gate (required)
good-first-issue,help-wanted, orscope:approvedlabel. (Issue opened, waiting for a maintainer to label it.)mainon my fork).Linked issue (required — use
Closes #NNNorFixes #NNN):Closes #404
What does this PR do?
It fixes first-time setup on macOS, which currently always fails at Analytics Core with
uv exited with code 2, so Analytics Full never runs.The install dir is
~/Library/Application Support/com.fincept.terminal. The pinned uv 0.7.12 can't open a lock file passed by a path containing a space (error: File not found: '/Users/<me>/Library/Application').--pythonandpip compile -opaths with the same space are fine, and the arguments already go to uv as aQStringList. The issue has a minimal repro.The install steps now run uv from the venv directory and pass
requirements.lockas a bare file name, so the space never reaches uv. uv is pinned with checksums, so this avoids a uv bump.Type of change
Changes made
fincept-qt/src/python/PythonSetupManager.cpp(+11 / -2):StepOptions: new optionalworking_dir.start_stepcallsQProcess::setWorkingDirectoryonly when it's set, so every other step is unchanged.lane_install_core: runs from the venv dir and passes-c requirements.lock.lane_install_full: runs from the venv dir and passes-r requirements.lockwhen not in fallback mode. The fallback still uses the bundled requirements file.How to test
cmake --build --preset macos-release) and launch, or click Retry Setup.uv pip install ... -c requirements.lockfinishing OK.Architecture / code-quality checklist
waitForFinished()on main thread) — see CLAUDE.md P1showEvent()/hideEvent()— see P3 (n/a)QProcessfor Python — usedPythonRunner::instance().run()— see P4 (uses the existingstart_steppath)print()in Python scripts — usedlogger.info/logger.warning— see P14 (n/a)Screenshots / logs
Before:
After: setup completes, with Analytics Core and Analytics Full installed.