-
Hi, While experimenting with how file discovery/inclusion works in hatch/hatchling, I stumbled on the following confusing behavior. I have this project layout:
So I have a (loose) python file The contents of pyproject.toml is: [project]
name = "thename"
version = "1.2.3"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build" After I build this with
and the contents of the wheel is
Note how the loose file Now, if I change the name in pyproject.toml, e.g. add a dash name = "the-name" the results are quite different. The sdist is roughly the same (except for
Same happens if I use different names in pyproject.toml ( This is behavior quite confusing and I wonder if this behavior is documented somewhere, or can be understood from rules in the documentation. And follow up question: what config should I use or add in pyproject.toml to make sure the behavior is consistent, regardless of the name, e.g. for the given source tree layout. thanks for your time and sorry about the wall of text |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
If you define any file selection options then the behavior is always consistent |
Beta Was this translation helpful? Give feedback.
-
Aha, many thanks for those pointers. |
Beta Was this translation helpful? Give feedback.
If you define any file selection options then the behavior is always consistent