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

Module instrospection seems to break EXE build with pyinstaller #38

Open
markusthegeek opened this issue Dec 3, 2023 · 0 comments
Open

Comments

@markusthegeek
Copy link

I successfully built a one file executable on Windows using Python 3.12 an pyinstaller, however I am getting an error that the value "file" is not valid for progress type. I think the same error happens for source type "mongo" as well.

Is it possible that the way these classes are found via introspection here is too complex for pyinstaller?

Would be great to be able to package both the Meilisearch executable and your great sync tool along with a C++ based end user app that uses MongoDB :-D

def _discover(module: ModuleType, t: Type):
    ret = {}
    for m in pkgutil.iter_modules(module.__path__):
        mod = importlib.import_module(f"{module.__name__}.{m.name}")
        for _, member in inspect.getmembers(mod, inspect.isclass):
            if issubclass(member, t) and member is not t:
                ret[member.type] = member
    return ret
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

No branches or pull requests

1 participant