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

Respect .python-version in Rye builds #1250

Merged
merged 1 commit into from
Jul 20, 2024
Merged

Respect .python-version in Rye builds #1250

merged 1 commit into from
Jul 20, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jul 20, 2024

Summary

Today, rye build uses the bootstrapped (or "self") environment, which means built wheels reflect the version from the bootstrapped environment, rather than the user's Python preference.

This PR changes build to instead create an ephemeral build environment based on the requested Python version (then install and run build in that environment).

Creating and populating that ephemeral build environment is extremely fast with uv; there's virtually no overhead.

Closes #1152.
Closes #1248.

Test Plan

  • Ran ../rye/target/debug/rye build from a directory with .python-version of 3.11.
  • Verified that Python 3.11 was used.

@b0o
Copy link

b0o commented Jul 20, 2024

Awesome! Seems to be working as expected.

@charliermarsh charliermarsh enabled auto-merge (squash) July 20, 2024 17:26
@charliermarsh charliermarsh merged commit 2c6247b into main Jul 20, 2024
8 checks passed
@charliermarsh charliermarsh deleted the charlie/build branch July 20, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants