Skip to content

Installing plugins with unmet dependencies crashes #1583

Open
@progval

Description

The current recommended way to make plugins pip-installable is this snippet:

from supybot.setup import plugin_setup

plugin_setup(
    'YourPlugin',
    install_requires=[
        'requests',
    ],
)

in setup.py

This means that:

  1. setup.py itself depends on Limnoria, so pip will crash if Limnoria is not already installed.
  2. Additionally, supybot.setup.plugin_setup imports the plugin (to get its metadata), which imports the plugin's plugin.py, which is likely to import the dependencies. However, said dependencies are not yet installed because we are still running the setup.

Point 1 could be solved by using pyproject.toml to declare a build-dependency on Limnoria.
Point 2 is harder to address. We may need to give up on automatically getting plugin metadata through introspection (ie. remove all/most of supybot.setup.plugin_setup) and recommend authors explicitly fill all the metadata in the plugin's pyproject.toml

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions