Skip to content

Update release workflow to build source and binary distributions#95

Merged
mattt merged 1 commit intomainfrom
mattt/build-wheel
May 9, 2023
Merged

Update release workflow to build source and binary distributions#95
mattt merged 1 commit intomainfrom
mattt/build-wheel

Conversation

@mattt
Copy link
Copy Markdown
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
Copy Markdown
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
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.

Create binary dist when publishing to pypi

2 participants