Skip to content

Commit

Permalink
Document that it's intentional that the virtualenv is colocated
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Feb 5, 2024
1 parent c767994 commit 6a1122f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/guide/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,19 @@ wheel is built:
[tool.hatch.build.targets.sdist]
include = ["src/my_package", "tests"]
```

## Can I Relocate Virtualenvs?

Rye very intentionally places the virtualenv (`.venv`) in the root folder of the
workspace. Relocations of virtualenvs is not supported. This is a very intentional
decision so that tools do not need to deal with various complex alternatives and can
rely on a simple algorithm to locate it. This is a form of convention over configuration
and can also assist editor integrations.

There are some known downsides of this. For instance if you are placing your projects
in Dropbox, it would cause this folder to synchronize. As a way to combat this, Rye
will automatically mark the virtualenv with the necessary flags to disable cloud sync
of known supported cloud synchronization systems.

For override this behavior you can set the `behavior.venv-mark-sync-ignore` configuration
key to `false`.

0 comments on commit 6a1122f

Please sign in to comment.