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

Stop calling distribution packages sdists? #539

Open
webknjaz opened this issue Jul 12, 2023 · 2 comments
Open

Stop calling distribution packages sdists? #539

webknjaz opened this issue Jul 12, 2023 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@webknjaz
Copy link
Member

I noticed that antsibull-build rebuild-single accepts --sdist-dir which is technically a lie. It calls python -m build internally that produces both an sdist and a wheel.

The helper function is kinda called correctly: https://github.com/ansible-community/antsibull/blob/f6fda44642e8c1d7f346cde2715dc62a824681ae/src/antsibull/build_ansible_commands.py#L316make_dist_with_wheels(). "Kinda" because wheels are dists, it's like daying "dist with dists".
And it's called with an "sdist dir" at https://github.com/ansible-community/antsibull/blob/f6fda44642e8c1d7f346cde2715dc62a824681ae/src/antsibull/build_ansible_commands.py#L742C9-L742C71.

This confusion leaked into the CLI/UX and external descriptions, including GHA workflows with steps like "Upload Ansible sdist to PyPI” being inspired by the misconception that it doesn't upload wheels.

Hence $sbj.

@felixfontein
Copy link
Collaborator

Yes, it makes sense to rename it.

@webknjaz webknjaz added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 13, 2023
@gotmax23
Copy link
Contributor

gotmax23 commented Jul 13, 2023

Yeah, this is all leftover from the time when we had that setup.py mess to warn users updating from ansible 2.9 and thus couldn't ship wheels.

I don't feel strongly about the function name, but feel free to submit a PR. The code is private (i.e. we don't promise a stable API), so changing it won't pose compatibility problems.

As for

https://github.com/ansible-community/antsibull/blob/f6fda44642e8c1d7f346cde2715dc62a824681ae/src/antsibull/cli/antsibull_build.py#L392-L396

I agree that's a problem. We should at least fix the help message. I would also add a --dist-dir argument for this and potentially deprecate --sdist-dir. We'll probably have to make a similar change to the release playbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants