Skip to content

Nanodesu! 1.0.1

Choose a tag to compare

@Nesarf Nesarf released this 03 Oct 12:29
· 44 commits to main since this release
b94443d

Nanodesu! 1.0.1

A maintenance release: the tool now ships with a test suite and continuous
integration, plus two robustness fixes.

Added

  • Test suite — 16 tests covering archive parsing, the extract → build
    round trip, --pyc header handling, contents-directory placement, PYZ
    extraction and the error paths. Synthetic archives keep the whole suite under
    a second, so no sample executable is needed:

    python -m unittest discover -s test -v

    Dedicated regression tests cover the three format details that silently
    produce a broken repack: lowercase z marking a PYZ archive, PYZ item type
    0 being an ordinary module, and headers prepended by --pyc being stripped
    again on repack.

  • Continuous integration — .github/workflows/tests.yml runs the suite on
    Linux and Windows across Python 3.9, 3.12, 3.13 and 3.14, byte-compiles both
    modules, self-tests the character canvas and smoke-tests the CLI.

Fixed

  • PYZ extraction could overwrite a module. When a module and a package
    claimed the same file path inside a PYZ archive (for example utils and
    utils.sub), the second one silently replaced the first. The extractor now
    detects the collision, writes the later module under a flattened name, and
    reports what it did.
  • Cleaner failures. A missing path or a directory passed where an archive
    was expected now prints a one-line message and exits with status 1, instead
    of showing a Python traceback.

Verified

  • 16/16 tests pass on Python 3.9, 3.12, 3.13 and 3.14.
  • Self-check on a 138.8 MB onefile build: 836 entries extracted, all verified,
    and unpack → repack → unpack still reproduces every file byte for byte.
  • The tool extracts and repacks itself: nanodesu.exe (62 entries) unpacks,
    repacks, passes verification, and the repacked binary still runs.

Install

No dependencies beyond Python 3.9+.

pip install .                                  # provides the `nanodesu` command
python nanodesu.py --help                      # or run it directly

The attached nanodesu.exe is a standalone 64-bit Windows build for
convenience.