-
Notifications
You must be signed in to change notification settings - Fork 151
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
Support for Python zipapp module #54
Comments
Do you open the .pyz file? |
@Falldog Yes, mylib.pye is in add_cols.pyz, which is just a plain zip file:
|
I have a trivial implementation that allows pye files in a zip package. I tested with python 3.10 on Windows 11, the zip package contains 100+ pye files in complex directory structure and everything works just like pyc files (a bit slower though). Basically in the original code, exists function is used to check file existence and open function is used to open file. This would work with regular file system but not files within a zip package. In my implementation when the file path contains .zip file the check existence and file read are handled differently (using the ZipFile operations). I do agree with other discussion that at least PyeLoader should be built as binary (Cython?) to make it a little bit more difficult to get the decrypted pyc file. |
@coldfire0200 awesome work!
Agree, it would be a new topic for next steps |
Thanks I will spend some time writing test cases this weekend. |
zipapp makes multiple Python files as a bundle to be easy distributed. However when the pye file is bundled into the zipapp, it can't be found. Here is a minimal demo:
Environment:
I have no experience in C/C++, and can not make more debuggings.
Thanks for help.
The text was updated successfully, but these errors were encountered: