Skip to content
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

Add skip-wheel to build only sdists #98

Merged
merged 10 commits into from
Mar 23, 2024
Merged

Add skip-wheel to build only sdists #98

merged 10 commits into from
Mar 23, 2024

Conversation

hynek
Copy link
Owner

@hynek hynek commented Mar 23, 2024

fixes #83

@agriyakhetarpal
Copy link

Thanks for being so quick! Happy to help put in a review if you need it, but I don't think it requires one.

@hynek
Copy link
Owner Author

hynek commented Mar 23, 2024

i think i've finally got it, but happy if you could take a look if it makes sense

Copy link

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does make sense, thank you! Otherwise – as discussed, there are four possibilities:

  1. Build an sdist (this PR)
  2. Build just a wheel
  3. Build an sdist and then a wheel from it – edit: oops, that is already the current functionality :)
  4. Build an sdist and a wheel from tree, separately

I suppose the rest of the three two could be taken up in a follow-up PR (only if you want to provide that)?

@hynek hynek merged commit 5034e57 into main Mar 23, 2024
3 checks passed
@hynek hynek deleted the allow-skip-wheel branch March 23, 2024 15:37
@hynek
Copy link
Owner Author

hynek commented Mar 23, 2024

I don’t think suppressing the sdist has any value whatsoever so I don’t think it’s worth the complexity. I’m not sure how I feel about 4 – it seems like an anti-pattern since it should be possible to build the identical wheel from an sdist and this is the way to enforce it?

@agriyakhetarpal
Copy link

it seems like an anti-pattern since it should be possible to build the identical wheel from an sdist and this is the way to enforce it?

I don't think wheels built that way would be identical – building a wheel from an sdist would mean that it respects your MANIFEST.in configuration (assuming for a moment that the build-backend is setuptools and tools like setuptools-scm are not being used). So if you have something like exclude my_favourite_file.md in your MANIFEST.in, it won't get included in the sdist and therefore it won't be there in your wheel, but if you build the wheel directly using python -m build --wheel, it will be.

One thing I agree on is that this behaviour breaks reproducible wheels when building from an sdist downloaded off PyPI or those being built from a git / other version control source – I definitely don't do this for my own projects... but maybe if build allows such behaviour for those who want it for experimental reasons (even with its harms), we can aim for feature parity with this action too?

hynek added a commit that referenced this pull request Mar 24, 2024
@multimeric
Copy link

Could you please tag a release so we can easily use this feature? Cheers.

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.

Feature request: provide an option to build just the source distribution, allow skipping wheel builds
3 participants