-
-
Notifications
You must be signed in to change notification settings - Fork 347
Description
I was working on a project and I experienced some strange behavior when I tried packaging files that were ignored by git.
First I was unsure about the behavior but then I looked at the documentation regarding the ignore-vcs
build flag (ignore-vcs docs) which seemed to be what I was looking for to solve my issue.
But after setting this flag to true
the files were still not included in the output. (wheel)
I tried and tested a few things and I think the ignore-vcs
flag has some kind of bug. (Or it's a skill issue on my side - I am still new to hatch and python packaging.)
I have created a small demo project which contains sources and instructions to reproduce the behavior.
The demo project shows three variants with different (partly unexpected behaviors):
- expected behavior: if
ignore-vcs
is not set, vcs ignored files are not part of the build output. - unexpected behavior and my problem: if
ignore-vcs
is set, vcs ignored files are still not part of the build output. - workaround / expected behavior: if there is no
.gitignore
file the files are part of the build output. (so for now I am deleting the .gitignore file before building)
If I need to provide more details do not hesitate to ask.
Thanks!