-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support for src structure #3
Comments
Whey uses: [tool.why]
source-dir = "src" Similar spelling and such would be nice unless there's a reason to do something differently, I'd think. Flit simply discovers |
I am trying to think what would be a good name for this setting. So far we have We already use "source" to refer to the project source, so I am leaning to @henryiii what do you think? |
Edit before sending: I see your edits, Well, given that this is often named "/src", I think it's highly advantageous to call it something with source in it. The second item could be "location" or "directory" (or "dir" for short). In other packages, it has a strong tendency to be called "dir" - setuptools calls it I'm not really fond of using
|
I think I am gonna go with |
I think that's consistent with what's already there, and quite readable. 👍 |
This is merged now, so can be closed? |
Yes. |
Src structure has some important benefits. Running something like pytest needs /src structure or otherwise it loads from the local folder instead. If you have compiled extensions, or if you use importlib stuff, it's critical to load the installed package, not the local folder. See, for example, scikit-build/cmake-python-distributions#145, which was motivated by scikit-build/cmake-python-distributions#139 (comment) for an example of problems in the wild.
However, not having editable support for now makes it a bit less attractive, since regular layout can run without installing in a pinch (if you avoid things like importlib), so maybe it would be best to wait till editable support is available (maybe best to use PEP 517 editable mode if it comes? PEP 660 or 662, whichever is accepted).
The text was updated successfully, but these errors were encountered: