Skip to content

Commit 0eb407c

Browse files
committed
Make the point of reusing source distribution lighter
Split the reuse of source distribution into two parts: the easier part of building a wheel from sdist (which is what build tool does), and the harder part of using it in all workflows. For the latter, suggest it's fine to let downstreams worry about that.
1 parent e925da1 commit 0eb407c

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

source/discussions/downstream-packaging.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,16 @@ source archive for downstream use, for example by attaching it to a GitHub
115115
release. Alternatively, large files, such as test data, can be split into
116116
separate archives.
117117

118-
A good idea is to **use your source distribution in the release workflow**.
119-
That is, build it first, then unpack it and perform all the remaining steps
120-
using the unpacked distribution rather than the Git repository — run tests,
121-
build documentation, build wheels. This ensures that it is well-tested,
122-
and reduces the risk that some users would hit build failures or install
123-
an incomplete package.
118+
A good idea is to use your source distribution in the release workflow.
119+
For example, the :ref:`build` tool does exactly that — it first builds a source
120+
distribution, and then uses it to build a wheel. This ensures that the source
121+
distribution actually works, and that it won't accidentally install fewer files
122+
than the official wheels.
123+
124+
Ideally, use the source distribution also run tests, build documentation,
125+
and so on, or add specific tests to make sure that all necessary files were
126+
actually included. Understandably, this requires more effort, so it's fine
127+
not do that — downstream packagers will report any missing files promptly.
124128

125129

126130
.. _no-internet-access-in-builds:

0 commit comments

Comments
 (0)