I don't know if I am missing the documentation (wouldn't be my first time)
I have found the details on how to create entry_points.console_script. I'm now looking to tie into other entry points hooks (specifically pytest this time).
I am looking for the poetry equivalent of the following setup.py code.
entry_points={
"pytest11": [
"cool_plugin = pytest_cool_plugin",
],
},
If I am just missing something please direct me to the docs, or if this is a dupe to the tracked issue so I can follow it.
Based on the documentation, I think you can do it like this:
[tool.poetry.plugins.pytest11]
cool_plugin = "pytest_cool_plugin"
or
[tool.poetry.plugins]
pytest11 = { cool_plugin = "pytest_cool_plugin" }
Related: #1300 and #1454 (poetry to support setuptools-like "plugins" entry-points), #693 (poetry to support plugins for itself), #658 (documentation on the difference between the two). I don't know why the first two issues are not closed since plugins entry-points seem to be implemented.
EDIT: #1454 is about extras in scripts and plugins sections. Not related.
ah cheers, I'll give that a shot
On Thu, 28 Nov 2019, 13:52 Timothée Mazzucotelli, notifications@github.com
wrote:
Based on the documentation, I think you can do it like this:
[tool.poetry.plugins.pytest11]cool_plugin = "pytest_cool_plugin"
Related: #1300 https://github.com/sdispater/poetry/issues/1300 and #1454
https://github.com/sdispater/poetry/issues/1454 (poetry to support
setuptools-like "plugins" entry-points), #693
https://github.com/sdispater/poetry/issues/693 (poetry to support
plugins for itself), #658 https://github.com/sdispater/poetry/issues/658
(documentation on the difference between the two). I don't know why the
first two issues are not closed since plugins entry-points seem to be
implemented.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/sdispater/poetry/issues/1641?email_source=notifications&email_token=ABIHQFGURDMWD3O52LQJXQTQV7EJJA5CNFSM4JSIFTZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFMVIVA#issuecomment-559502420,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABIHQFCJ4WMBI7DCSAIYSKLQV7EJJANCNFSM4JSIFTZQ
.
My plugin works as expected. Thanks for the guidance.
Most helpful comment
Based on the documentation, I think you can do it like this:
or
Related: #1300 and #1454 (poetry to support setuptools-like "plugins" entry-points), #693 (poetry to support plugins for itself), #658 (documentation on the difference between the two). I don't know why the first two issues are not closed since plugins entry-points seem to be implemented.
EDIT: #1454 is about extras in scripts and plugins sections. Not related.