Poetry: How do we specify paste entrypoints

Created on 15 Aug 2019  路  8Comments  路  Source: python-poetry/poetry

  • [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.

Question


How can I replicate the non-script / paste entrypoints? Specifically, for a pyramid project, I've got:

    entry_points={
        'paste.app_factory': [
            'main = someproject:main',
        ],

Is there a way to do this in poetry?

Most helpful comment

i wonder whether an entrypoints section in the docs for the pyproject.toml that points to the plugins and scripts sections would be helpful to avoid such confusions. i'm always looking for it in the sidebar, but have to search the whole page to find what i'm looking for.

All 8 comments

@viraptor this is done via the plugin section.

[tool.poetry.plugins."paste.app_factory"]
main = "someproject:main"

i wonder whether an entrypoints section in the docs for the pyproject.toml that points to the plugins and scripts sections would be helpful to avoid such confusions. i'm always looking for it in the sidebar, but have to search the whole page to find what i'm looking for.

For the record, there is a way to avoid the need for paste entry point with Pyramid: https://github.com/Pylons/pyramid/issues/3270#issuecomment-427417681

But I agree that entry points are still a useful feature for various use cases, so general-purpose packaging tools should support them.

I think this issue can be closed. Maybe a new issue could be opened for documentation improvements as scripts versus entrypoints versus plugins seems to create a lot of confusion.

Hello all,

there is already a discussion about scripts/entrypoints in #241 and https://github.com/sdispater/poetry/pull/1504.

I see it like @pawamoy that this issue can be closed in favor of the others.

If someone disagree please let me know :)

fin swimmer

That other issue seems to be about scripts (I didn鈥檛 re-read all messages)
This one here was a question about entry point (which got answered, support is already there), so why not keep it open as a documentation ticket?

Hello @merwok ,

the issue tracker isn't the right place for a applications documentation. We need it in first place, to have an overview about what work needs to be done. Of course it contains a lot of knowledge by the time. But if this is in general interested it should be put on the help page/documentation itself.

fin swimmer

I wasn鈥檛 saying to keep this ticket open to serve as documentation, but that the ticket is a doc bug, i.e. a request to enhance poetry鈥檚 doc and avoid other people asking the same question in the future.

Was this page helpful?
0 / 5 - 0 ratings