Skip to content
New issue

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

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

Already on GitHub? # to your account

Update release workflow to build source and binary distributions #95

Merged
merged 1 commit into from
May 9, 2023

Conversation

mattt
Copy link
Contributor

@mattt mattt commented Apr 24, 2023

Resolves #81

The current release workflow builds the Python package for distribution using the following command:

python -m build --sdist --outdir dist .

Looking at the help text for the command, the default behavior is to build both source and binary distribution. By specifying --sdist, we're opting out of a binary distribution, so we can remove it to opt back into that behavior.

Going a step further, the default options use dist as an output directory, use the current directory as the source directory, and build source and binary distribution, which is what we're already doing. So we can get the desired behavior by running without any additional options:

python -m build

Signed-off-by: Mattt Zmuda <mattt@replicate.com>
@mattt mattt force-pushed the mattt/build-wheel branch from 2a0c2be to 4a206f9 Compare April 24, 2023 20:38
@mattt
Copy link
Contributor Author

mattt commented Apr 24, 2023

@bfirsh Any reason not to package a binary distribution alongside the source? When I ran this locally, the resulting filename had the suffix -py3-none-any.whl, which seems to indicate compatibility with any version of Python 3 running on any platform.

@mattt mattt requested a review from bfirsh April 24, 2023 20:42
@mattt mattt merged commit 44e10a4 into main May 9, 2023
@mattt mattt deleted the mattt/build-wheel branch May 9, 2023 13:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create binary dist when publishing to pypi
2 participants