1- # Test data for ` test_zipfile `
1+ # Test data for ` test_zipfile ` , ` test_tarfile ` (and even some others)
22
3- The test executables in this directory are created manually from header.sh and
3+ ## ` test_zipfile `
4+
5+ The test executables in this directory are created manually from ` header.sh ` and
46the ` testdata_module_inside_zip.py ` file. You must have Info-ZIP's zip utility
57installed (` apt install zip ` on Debian).
68
7- ## Purpose
9+ ### Purpose of ` exe_with_zip ` and ` exe_with_z64 `
810
911These are used to test executable files with an appended zipfile, in a scenario
1012where the executable is _ not_ a Python interpreter itself so our automatic
1113zipimport machinery (that'd look for ` __main__.py ` ) is not being used.
1214
13- ## Updating the test executables
15+ ### Updating the test executables
1416
1517If you update header.sh or the testdata_module_inside_zip.py file, rerun the
1618commands below. These are expected to be rarely changed, if ever.
1719
18- ### Standard old format (2.0) zip file
20+ #### Standard old format (2.0) zip file
1921
2022```
2123zip -0 zip2.zip testdata_module_inside_zip.py
2224cat header.sh zip2.zip >exe_with_zip
2325rm zip2.zip
2426```
2527
26- ### Modern format (4.5) zip64 file
28+ #### Modern format (4.5) zip64 file
2729
2830Redirecting from stdin forces Info-ZIP's zip tool to create a zip64.
2931
@@ -32,4 +34,3 @@ zip -0 <testdata_module_inside_zip.py >zip64.zip
3234cat header.sh zip64.zip >exe_with_z64
3335rm zip64.zip
3436```
35-
0 commit comments