You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under the same typeCmprsData ('s') PyInstaller versions prior to 3.2 store Python source files (see issue 1847). They shouldn't be prefixed with pyc header.
I didn't (yet) find any way to detect if 's' file is compiled or not (PyInstaller version is unknown from file) - other than reading the first byte to check if it is marshalled code object ('c').
The text was updated successfully, but these errors were encountered:
ncaklovic
changed the title
PyInstaller version prior to 3.2 do not pre-compile ARCHIVE_ITEM_PYSOURCE
PyInstaller versions prior to 3.2 do not pre-compile ARCHIVE_ITEM_PYSOURCE
May 11, 2022
That's correct. Old versions of pyinstaller store the code as-is. As there doesn't seem to have a definite way to find the exact version of PyInstaller, one workaround can be to use some heuristics to differentiate between text vs binary data and save as a .pyc or .py accordingly.
Also pyinstaller 3.2 was released back in 2016. Maybe we can keep the current code and save as .pyc with a warning when finding files of type ARCHIVE_ITEM_PYSOURCE.
Under the same
typeCmprsData
('s') PyInstaller versions prior to 3.2 store Python source files (see issue 1847). They shouldn't be prefixed with pyc header.I didn't (yet) find any way to detect if 's' file is compiled or not (PyInstaller version is unknown from file) - other than reading the first byte to check if it is marshalled code object ('c').
The text was updated successfully, but these errors were encountered: