-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Coconut is incompatible with the zipapp module #720
Labels
Comments
I think that you should be able to make this work if you compile everything with |
After a few quick tests, this indeed seems to be working, at the cost of tripling the resulting build's size. But I think can live with that for now :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Part of coconut's current header contains a check for a
__init__.py
file in the executed python file's directory. That check usesos.listdir
which cannot operate within a zippapp. It is a known issue for zippapps to not be able to read files and directories like you could if you simply execute a python script, or a directory (using__main__.py
). Tools like https://github.com/linkedin/shiv seem to circumvent this by extracting the zipapp before execution.I'm not sure this is easily fixable, but since I just racked my brain for an hour wondering why this suddenly stopped working compared to older coconut versions, maybe a warning could be added to the docs or faq? :)
The text was updated successfully, but these errors were encountered: