Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register entry point hooks for things like pytest/click etc. #1641

Closed
EdgyEdgemond opened this issue Nov 27, 2019 · 4 comments
Closed

Register entry point hooks for things like pytest/click etc. #1641

EdgyEdgemond opened this issue Nov 27, 2019 · 4 comments
Labels
kind/feature Feature requests/implementations

Comments

@EdgyEdgemond
Copy link

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x ] I have searched the documentation and believe that my question is not covered.

Feature Request

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.

@EdgyEdgemond EdgyEdgemond added the kind/feature Feature requests/implementations label Nov 27, 2019
@pawamoy
Copy link

pawamoy commented Nov 28, 2019

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.

@EdgyEdgemond
Copy link
Author

EdgyEdgemond commented Nov 28, 2019 via email

@EdgyEdgemond
Copy link
Author

My plugin works as expected. Thanks for the guidance.

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

2 participants