Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.md | D | 23-Nov-2023 | 1,008 | 36 | 24 | |
exe_with_z64 | D | 23-Nov-2023 | 978 | 27 | 22 | |
exe_with_zip | D | 23-Nov-2023 | 990 | 29 | 24 | |
header.sh | D | 23-Nov-2023 | 713 | 25 | 19 | |
testdata_module_inside_zip.py | D | 23-Nov-2023 | 69 | 3 | 1 |
README.md
1# Test data for `test_zipfile` 2 3The test executables in this directory are created manually from header.sh and 4the `testdata_module_inside_zip.py` file. You must have infozip's zip utility 5installed (`apt install zip` on Debian). 6 7## Purpose 8 9These are used to test executable files with an appended zipfile, in a scenario 10where the executable is _not_ a Python interpreter itself so our automatic 11zipimport machinery (that'd look for `__main__.py`) is not being used. 12 13## Updating the test executables 14 15If you update header.sh or the testdata_module_inside_zip.py file, rerun the 16commands below. These are expected to be rarely changed, if ever. 17 18### Standard old format (2.0) zip file 19 20``` 21zip -0 zip2.zip testdata_module_inside_zip.py 22cat header.sh zip2.zip >exe_with_zip 23rm zip2.zip 24``` 25 26### Modern format (4.5) zip64 file 27 28Redirecting from stdin forces infozip's zip tool to create a zip64. 29 30``` 31zip -0 <testdata_module_inside_zip.py >zip64.zip 32cat header.sh zip64.zip >exe_with_z64 33rm zip64.zip 34``` 35 36