1
- # Test data for ` test_zipfile `
1
+ # Test data for ` test_zipfile ` , ` test_tarfile ` (and even some others)
2
2
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
4
6
the ` testdata_module_inside_zip.py ` file. You must have Info-ZIP's zip utility
5
7
installed (` apt install zip ` on Debian).
6
8
7
- ## Purpose
9
+ ### Purpose of ` exe_with_zip ` and ` exe_with_z64 `
8
10
9
11
These are used to test executable files with an appended zipfile, in a scenario
10
12
where the executable is _ not_ a Python interpreter itself so our automatic
11
13
zipimport machinery (that'd look for ` __main__.py ` ) is not being used.
12
14
13
- ## Updating the test executables
15
+ ### Updating the test executables
14
16
15
17
If you update header.sh or the testdata_module_inside_zip.py file, rerun the
16
18
commands below. These are expected to be rarely changed, if ever.
17
19
18
- ### Standard old format (2.0) zip file
20
+ #### Standard old format (2.0) zip file
19
21
20
22
```
21
23
zip -0 zip2.zip testdata_module_inside_zip.py
22
24
cat header.sh zip2.zip >exe_with_zip
23
25
rm zip2.zip
24
26
```
25
27
26
- ### Modern format (4.5) zip64 file
28
+ #### Modern format (4.5) zip64 file
27
29
28
30
Redirecting from stdin forces Info-ZIP's zip tool to create a zip64.
29
31
@@ -32,4 +34,3 @@ zip -0 <testdata_module_inside_zip.py >zip64.zip
32
34
cat header.sh zip64.zip >exe_with_z64
33
35
rm zip64.zip
34
36
```
35
-
0 commit comments