Skip to content

Adds compress-level option to sdist and wheel configs #1995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cstigen
Copy link

@cstigen cstigen commented Jun 6, 2025

We're using hatchling at work to bundle ~80 moderately large JSON files into an sdist tarball.

This takes ~50 seconds with the default gzip compression level of 9. With level 1 it takes only a few seconds at the expense of a few tens of megabytes. For us, this is a desirable trade-off, and I believe it could make sense for others as well.

Since I wasn't able to find any contribution docs I'm going to put this PR in draft mode. For example, I haven't made any tests.

Of course, I'm expecting some feedback on the merit of this idea as well.

@cstigen cstigen force-pushed the sdist-compress-level branch 2 times, most recently from 115e24a to 49da117 Compare June 13, 2025 09:41
@cstigen cstigen changed the title Adds option tool.hatch.build.targets.sdist.compress-level Adds compress-level to sdist and wheel configs Jun 13, 2025
@cstigen cstigen changed the title Adds compress-level to sdist and wheel configs Adds compress-level option to sdist and wheel configs Jun 13, 2025
@cstigen cstigen force-pushed the sdist-compress-level branch from 49da117 to ab5af04 Compare June 13, 2025 09:44
@cstigen cstigen force-pushed the sdist-compress-level branch from ab5af04 to d96b167 Compare June 13, 2025 09:45
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