Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to prevent Poetry to consider .gitignore

I am working on a python project which uses pythonnet with several C# dll's as dependencies. As I do not want to push the dll's to the git repository I adapted the .gitignore file. However, now Poetry does not include the dll's into the python package.

Is there a way to force Poetry to ignore the .gitignore?

like image 925
Johannes Avatar asked Feb 22 '21 10:02

Johannes


1 Answers

Yes, the .gitignore just serves as the default-settings for poetrys inclusion/exclusion list. You can configure it manually with the include field, which is documented here.

In your case, you just need to specify the dll folder that you are excluding in your gitignore:

.gitignore

# ...
src/dlls

pyproject.toml

[tool.poetry]
# ...
include = ["src/dlls/*"]
like image 192
Arne Avatar answered Nov 09 '22 11:11

Arne