Build a wheel in the release workflow - #378
Open
Hansheng-Li wants to merge 1 commit into
Open
Conversation
The release job builds with `python setup.py sdist`, so every release since 0.10.1 has been sdist-only. Switch to `python -m build`, which produces both the sdist and a wheel from the existing setup.py. The sdist is byte-for-byte equivalent in contents, and the wheel picks up package_data correctly, including the Lua scripts that RedisScripts loads at runtime.
Hansheng-Li
force-pushed
the
build-wheel-in-release-workflow
branch
from
August 6, 2026 03:48
b30787b to
f9ea763
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tasktiger publishes an sdist and nothing else — PyPI has a single file for 0.25.0, and only 0.9.5 and 0.10.1 have ever shipped a wheel.
release.ymlbuilds withpython setup.py sdist, andbuildisn't in the prep step.The package is pure Python, so nothing is broken — pip just builds the wheel locally on every install. But that needs a build toolchain on every install host, and it fails outright with
--only-binary=:all:, against wheel-only internal mirrors, and in hash-pinned lockfiles.python setup.py sdistis deprecated in current setuptools as well.This switches the build step to
python -m build. No metadata changes;setup.pyis untouched.I checked the output against master first, since
package_data={"tasktiger": ["lua/*.lua"]}is load-bearing —RedisScriptsreadsmove_task.luafrom the installed package at construction time:Both scripts are in the wheel, the sdist is unchanged (same 60 entries), and the wheel installs and constructs a
TaskTigerin a clean venv. The flip side is worth knowing: moving this metadata intopyproject.tomlunder[project]silently drops the Lua files, which is why this leavessetup.pyalone.Since
release.ymlisworkflow_dispatchunderenvironment: production, this can't be exercised from a PR. Happy to follow up with a job intest.yamlthat builds and imports the installed wheel if you'd like the packaging path covered on master.Unrelated, but I was in the same files: #371 and #372 already cover the
redis<5constraint and croniter/pytz.