astral-sh / rye

a Hassle-Free Python Experience
https://rye.astral.sh
MIT License
13.6k stars 466 forks source link

rye sync should give an option not to build editables #1229

Open nazq opened 2 months ago

nazq commented 2 months ago

I have many py/rust projects where I control the build and test steps then only do a final rye build, or maybe even maturin build at the end. It would be great to have an option not to try and build some of these larger projects when I just want to start and sync a venv.

Thought about a few ways of doing this. Looking at the sync source it looks like it defers to uv sync so we could either

  1. Add a new param, say --no-build-editable and at the sync step resolve the deps but not include the editable itself
  2. Make a change in uv to do much the same, would be a little more complex and is almost covered by the --no-build, --no-binary, --only-binary but not fully. For example --no-binary fails when we really need to build a non editable dep

My gut instinct is this is better suited to rye as a python project build tool, rather than uv which is much more a package resolver and installer.

Thoughts? PR looks pretty straightforward happy to put it in

b0o commented 2 months ago

+1! Same with rye add. This is bugging me because my build runs mypyc, and builds often fail when I'm in the middle of making changes.

nazq commented 2 months ago

Glad you agree. I have something rough working but would like some agreement from the wider group before I push further.

+1 on your msg!

b0o commented 2 months ago

Could you share what you have so far? It would be nice to have a workaround in the mean time.

JonZeolla commented 1 month ago

Myself and others have also hit this issue and worked around it similar to this but I'd prefer to remove that hack :)