Add py3-none-any wheels to the distribution artefacts by freakboy3742 · Pull Request #1914 · nedbat/coveragepy (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation6 Commits3 Checks31 Files changed
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
Fixes #1912.
- Adds support for generating py3-none-any wheels. If the user has
COVERAGE_DISABLE_EXTENSION
defined in their environment, no attempt will be made to compile a binary wheel, even if the platform would otherwise support building the binary extension - Adds a py3-none-any artefact to the build products of a normal build. A wheel was already being compiled as part of the sdist step; this ensures that (a) the wheel is a py3-none-any wheel, and (b) it's included in the release artefacts.
Thanks!
But in your action I see:
> List non-binary artifacts
-rw-r--r-- 1 runner docker 200525 Jan 10 01:49 coverage-7.6.11a0.dev1-py3-none-any.whl
-rw-r--r-- 1 runner docker 804612 Jan 10 01:49 coverage-7.6.11a0.dev1.tar.gz
and in my last run of the action I see:
> List sdist
-rw-r--r-- 1 runner docker 235413 Dec 26 16:45 coverage-7.6.10-cp39-cp39-linux_x86_64.whl
-rw-r--r-- 1 runner docker 803868 Dec 26 16:45 coverage-7.6.10.tar.gz
Was my .whl there useless? Is it ok that it has a different name?
The old sdist
build rule ran python -m build
, which will produce both a wheel (native to the local platform) and an sdist by default - that's what produced the cp39-cp39-linux_x86_64
wheel. However, the action then excluded all but the .tar.gz file from the uploaded artefacts.
This new config forces the "native" wheel to be py3-none-any, and includes it in the uploaded artefacts.
The old configuration could have been optimised slightly by invoking python -m build -s
- that would have only produced the sdist. However, it's a moot point now, as we want the wheel as well.
Sorry for all the questions. You say "The old sdist build rule ran python -m build
", but that is still the command being run. The new config seems to be the environment variable disabling the compilation of the extension. That's enough to change the name of the result?
Invoking python -m build
produces a wheel and an sdist. The command is running on Linux; so in the old configuration, a binary wheel is produced, because the extension module can be compiled.
In the new configuration, the compilation of the binary extension is disabled with the environment variable, but a wheel is still being produced; so the wheel identifies as py3-none-any.
2 participants