-
Notifications
You must be signed in to change notification settings - Fork 752
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
Project directory structure #7341
Comments
Have you tried See https://docs.astral.sh/uv/concepts/projects/#packaged-applications |
Thanks for all you help on these, the issue was different and it's more likely related to the Also I'm curious how does everyone find the |
Yeah totally. This is all build backend configuration. We don't provide our own build backend yet (#3957) but I believe hatchling supports what you're describing or you could use another build backend like setuptools: https://setuptools.pypa.io/en/latest/userguide/package_discovery.html There's also https://docs.astral.sh/uv/concepts/workspaces/ if you have more complicated setups. |
One way of doing it in
|
Hello.
[UV: 0.4.6, Python: 3.12.4]
(I'm using Poetry since it's inception, so I might be opinionated, but I'm learning a lot when going through the issues here - if something might sound like a "Poetry user's opinion" feel free to call me out :))
I'm also quite opinionated when it comes to the project directory structure, what you propose here, for projects leads into other challenges down the line, like being forced to "dance around" the
.venv
directory in Docker.Where if you were to "
src
the project", like so:Then a few things can happen:
src
don't redo the dependency installation if uv.lock or pyproject.toml did not change
This approach should be doable with a pyproject.toml addition of:
but for some reason my_project is not available for import.
The text was updated successfully, but these errors were encountered: