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

Installing plugins with unmet dependencies crashes #1583

Open
progval opened this issue Jul 20, 2024 · 0 comments
Open

Installing plugins with unmet dependencies crashes #1583

progval opened this issue Jul 20, 2024 · 0 comments

Comments

@progval
Copy link
Owner

progval commented Jul 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant