Skip to content

+ create standards-compliant Python wheel archives - #109

Merged
Hawkynt merged 1 commit into
mainfrom
feat/wheel-writer
Aug 29, 2026
Merged

+ create standards-compliant Python wheel archives#109
Hawkynt merged 1 commit into
mainfrom
feat/wheel-writer

Conversation

@Hawkynt

@Hawkynt Hawkynt commented Aug 28, 2026

Copy link
Copy Markdown
Owner

What changed

  • promote Python Wheel from read-only to WORM creation
  • preserve caller-supplied root *.dist-info/METADATA / WHEEL metadata when present
  • make generic archive conversion produce a valid wheel by synthesizing deterministic minimal .dist-info metadata when the source is just an arbitrary file tree
  • ignore the reader-only synthetic metadata.ini input during creation
  • regenerate RECORD from the actual files being written using PEP 427 SHA-256 URL-safe hashes and byte sizes
  • write the RECORD self-row with empty hash/size as required
  • reject duplicate/unsafe archive paths instead of constructing ambiguous wheels
  • order package files deterministically and place .dist-info last as recommended by PEP 427

Verification

Added/extended NUnit coverage for:

  • CanCreate capability
  • descriptor-created wheel round-trip through the existing reader
  • generic file-tree conversion with synthesized wheel metadata
  • generated RECORD hashes/size rows and RECORD self-row
  • existing list/extract behavior

The first CI run exposed the repository-wide conversion-matrix contract: every IArchiveCreatable target must be able to carry generic archive payloads. The writer now satisfies that contract without weakening Wheel validity. Repository CI performs compile/test verification in this environment.

@Hawkynt
Hawkynt force-pushed the feat/wheel-writer branch 2 times, most recently from 52117ad to 0e8e56c Compare August 28, 2026 17:21
Promotes Wheel from read-only to WORM creation. A caller-supplied root
*.dist-info/METADATA and WHEEL are kept as given; RECORD is regenerated from
the bytes actually written, with PEP 427 URL-safe SHA-256 hashes and sizes,
and its own row left empty as the spec requires. The .dist-info entries are
placed last, and the reader-only metadata.ini input is ignored.

A tree that carries no packaging metadata gets a minimal deterministic pair
synthesized rather than being refused, which is what eight conversion pairs
need. The directory takes the escaped distribution name and the metadata the
dashed one.
@Hawkynt
Hawkynt force-pushed the feat/wheel-writer branch from 0e8e56c to 1fd6744 Compare August 28, 2026 20:31
@Hawkynt
Hawkynt merged commit 655598c into main Aug 29, 2026
3 checks passed
@Hawkynt
Hawkynt deleted the feat/wheel-writer branch August 29, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant