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
Does not work with Nuitka #55
Comments
PRs welcome, but I'm not a Nuitka expert to tell 🤔 |
Tried it with appdirs instead of platformdirs, and there is no such error in the binary. |
Not sure how that's relevant here. |
platformdirs is a fork of appdirs. Whatever's causing the problem was introduced within this fork. |
A lot of things changed, so I don't think that helps in any shape or form. And while it started as a fork, today is more like a complete reimagination of it with just the API being similar. And likely that information will be completely useless to track down and fix the issue. Just to spell out, a PR would be welcome on this, but don't expect the maintainers to act on this otherwise. |
Fair enough. Thanks for the explanation. |
The issue is the dynamic imports https://github.com/platformdirs/platformdirs/blob/2.4.1/src/platformdirs/__init__.py#L20-L33 Changing to actual import statements and executing the logic outside of that function should fix it. |
@txtsd Can you try? |
If there's an option in nuitka to make things work, I'd vote for closing personally. Things which do "odd" packaging things (or users of them) are responsible for making things work, so long as we are doing "normal" python things. Overkill or not, what's here is perfectly well specified Python behavior. |
@gaborbernat GLORIOUS! |
Nuitka creates a single executable out of your python code.
I've used platformdirs in a project of mine called mcrpc. The code itself runs fine, but the executable created with Nuitka spits out this error:
It spits out a similar error on windows:
ModuleNotFoundError: No module named 'platformdirs.windows'
Is there anything that can be done on platformdirs' side to help it work well with Nuitka? You can try using the executables from v1.2.
The text was updated successfully, but these errors were encountered: