Skip to content

Scope the sdist to the package - #8

Open
0xFantomMenace wants to merge 2 commits into
masterfrom
fix/sdist-scope
Open

0xFantomMenace wants to merge 2 commits into
masterfrom
fix/sdist-scope

Conversation

@0xFantomMenace

Copy link
Copy Markdown
Member

The wheel has always been scoped to the oxarchive package. The sdist had no scope at all, so the build backend included every non-ignored file in the working directory at build time.

The effect is visible on the published artifacts for 1.8.0: the wheel is 87 KB and the sdist is 1.67 MB.

This adds an explicit [tool.hatch.build.targets.sdist] include list, so the source distribution carries the package, the readme, the changelog, the licence and the project file, and nothing else. It also ignores agent working directories so they cannot be picked up by a future build.

Verified by rebuilding: the sdist goes from 1.67 MB and 654 files to 84 KB and 30 files.

The wheel has always been scoped to the oxarchive package, but the sdist had
no scope at all, so the build backend included every non-ignored file in the
working directory. Version 1.8.0's sdist is 1.67 MB against an 87 KB wheel
because of it.

List what ships instead of relying on the default, and ignore agent working
directories so they cannot be swept in again. A rebuilt sdist is 84 KB and 30
files.
The include list fixes today's build. This stops it regressing: the job
plants a stray directory, builds the sdist, and fails if anything outside
the package ends up inside it.
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