Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] Venv tweaks based on testing in Sandboxes #2264

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

Lagoja
Copy link
Contributor

@Lagoja Lagoja commented Sep 11, 2024

Summary

A few small tweaks after testing in Sandboxes

  1. Move the STATE_CHECK to after we verify that a VENV exists and that it's properly formatted. This ensures that we can fix scenarios where the venv was deleted or broken, without excessively prompting the user
  2. Add a UV_PYTHON environment variable to ensure that users who install uv don't accidentally overwrite the Python version in their devbox.json

How was it tested?

  1. Open the python-flask Jetify Example in Sandboxes
  2. Test .venv is setup correctly with devbox shell
  3. Delete the .venv dir, verify that re-running devbox shell creates it
  4. Install uv (devbox add uv)
  5. Verify that uv sync and other commands don't override Devbox Python

@Lagoja Lagoja marked this pull request as ready for review September 11, 2024 20:23
@Lagoja Lagoja merged commit d1ab641 into main Sep 12, 2024
24 checks passed
@Lagoja Lagoja deleted the jl/venv-sandbox-tweak branch September 12, 2024 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants