Skip to content

Fix entry point script.#1334

Open
Hellseher wants to merge 1 commit intomps-youtube:masterfrom
Hellseher:patch-1
Open

Fix entry point script.#1334
Hellseher wants to merge 1 commit intomps-youtube:masterfrom
Hellseher:patch-1

Conversation

@Hellseher
Copy link

main.py is in a "mps_youtube" and not in "mps_youtube/main".

`main.py` is in a "mps_youtube" and not in "mps_youtube/main".
@McSinyx
Copy link

McSinyx commented Jan 19, 2026

To quote the entry point specification:

The object reference points to a Python object. It is either in the form importable.module, or importable.module:object.attr. Each of the parts delimited by dots and the colon is a valid Python identifier. It is intended to be looked up like this:

import importlib
modname, qualname_separator, qualname = object_ref.partition(':')
obj = importlib.import_module(modname)
if qualname_separator:
    for attr in qualname.split('.'):
        obj = getattr(obj, attr)

In other words, even though some build frontends like pip create entry points with from importable.module import object; object.attr()/from mps_youtube import main; main.main(), they only need to from importable import module; module.object.attr/import mps_youtube; mps_youtube.main.main to be compliant with the specification.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants