File: README.md

package info (click to toggle)
python3.13 3.13.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 121,256 kB
  • sloc: python: 703,743; ansic: 653,888; xml: 31,250; sh: 5,844; cpp: 4,326; makefile: 1,981; objc: 787; lisp: 502; javascript: 213; asm: 75; csh: 12
file content (36 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Test data for `test_zipfile`, `test_tarfile` (and even some others)

## `test_zipfile`

The test executables in this directory are created manually from `header.sh` and
the `testdata_module_inside_zip.py` file.  You must have Info-ZIP's zip utility
installed (`apt install zip` on Debian).

### Purpose of `exe_with_zip` and `exe_with_z64`

These are used to test executable files with an appended zipfile, in a scenario
where the executable is _not_ a Python interpreter itself so our automatic
zipimport machinery (that'd look for `__main__.py`) is not being used.

### Updating the test executables

If you update header.sh or the testdata_module_inside_zip.py file, rerun the
commands below.  These are expected to be rarely changed, if ever.

#### Standard old format (2.0) zip file

```
zip -0 zip2.zip testdata_module_inside_zip.py
cat header.sh zip2.zip >exe_with_zip
rm zip2.zip
```

#### Modern format (4.5) zip64 file

Redirecting from stdin forces Info-ZIP's zip tool to create a zip64.

```
zip -0 <testdata_module_inside_zip.py >zip64.zip
cat header.sh zip64.zip >exe_with_z64
rm zip64.zip
```