Poetry does not respect the include in the pyproject.toml when the listed file is in the `.gitignore`
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name:
- Poetry version:
- Link of a Gist with the contents of your pyproject.toml file:
Issue
I am trying to include in the published package, some files that are build artifacts so are in the .gitignore
. I am really struggling to get everything to work, because no matter what I do Poetry seems to accept the .gitignore
over the globs listed in the pyproject.toml
tool.poetry.include
field. I ran it with -vvv
and Poetry is straight up not including the files. However, when I remove the pattern for the files from the .gitignore
it works fine. I am going to try and use a different version of Poetry but I think this is a important bug that should be fixed. Thanks!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
poetry build not respecting git's ignore patterns when `-f` is ...
Hello, I am on the latest poetry version (1.0.10) on a rhel7 box, and noticed a bizarre behavior related to poetry build.
Read more >how to prevent Poetry to consider .gitignore - Stack Overflow
gitignore file. However, now Poetry does not include the dll's into the python package. Is there a way to force Poetry to ignore...
Read more >Basic usage | Documentation | Poetry - Python dependency ...
The pyproject.toml file is what is the most important here. This will orchestrate your project and its dependencies. For now, it looks like...
Read more >Dependency Scanning - GitLab Docs
When a supported dependency file is detected, all dependencies, including transitive dependencies are analyzed. There is no limit to the depth of nested...
Read more >Hypermodern Python Cookiecutter - Read the Docs
Note: Do not include a README.md, LICENSE, or .gitignore. ... Dependencies are managed by Poetry and declared in the pyproject.toml file.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello @johnwalz97,
I think your wildcard usage is wrong. Try this:
fin swimmer
Hey @finswimmer. Thanks for the response!
You are correct that was my issue. Well, that and a typo. Initially I had used the correct wildcard pattern but I mis-typed the directory name. Then I realized that when I removed the directory from the
.gitignore
it worked. So I assumed something was up with Poetry. The reason that worked though was just because the directory was inside the Python package directory so it was automatically included even if the wildcard was off…I was doing some late-night coding and was struggling with a lot of other issues not related to Poetry. This was my first issue on GitHub so I feel pretty stupid lol. Thank you so much though for the fix!
- John