Skip to content

build: limit sdist contents to source and metadata files#65

Merged
vdusek merged 1 commit into
masterfrom
build/limit-sdist-contents
May 12, 2026
Merged

build: limit sdist contents to source and metadata files#65
vdusek merged 1 commit into
masterfrom
build/limit-sdist-contents

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented May 12, 2026

Summary

Mirrors apify/crawlee-python#1890.

The latest crawlee-python beta release failed when uploading the sdist:

400 Bad Request — Project size too large. Limit for project 'crawlee' total size is 10 GB.

pyproject.toml only configured the wheel target, so hatchling's default sdist bundled the entire repo. Each released sdist was much larger than the actual source. Combined with the fact that a beta release is published on every src-touching commit to master, the cumulative storage quota on PyPI hit the cap fast.

This PR applies the same fix here: an explicit [tool.hatch.build.targets.sdist] that ships only src/apify_shared and standard metadata files (CHANGELOG.md, CONTRIBUTING.md, LICENSE, README.md, pyproject.toml). Verified locally: built sdist is ~17 KB and contains only those files.

Tests are intentionally excluded — they need dev-only deps that aren't installable from a plain sdist anyway.

Note

PyPI's cap is cumulative across all uploaded files, so the eventual mitigation requires a project size limit increase once a project hits its quota. This PR just keeps future releases from chewing through quota.

Mirrors apify/crawlee-python#1890. Without an explicit sdist target,
hatchling bundles the whole repo, ballooning the released sdist and
chewing through PyPI's cumulative project size quota on every beta
release.
@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels May 12, 2026
@vdusek vdusek self-assigned this May 12, 2026
@vdusek vdusek requested a review from janbuchar May 12, 2026 08:46
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 12, 2026
@vdusek vdusek merged commit a1d5d4c into master May 12, 2026
24 checks passed
@vdusek vdusek deleted the build/limit-sdist-contents branch May 12, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants