build: include man page in sdist tarballs #3510
Merged
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.
Resolves #3507
This adds the man page to the sdist tarballs by white-listing the man page build path. It can be found here now:
docs/_build/man/streamlink.1
Due to the white-listing, the man page gets included twice (same path though), first by the
recursive-include docs *
pattern in the manifest, and second by thedata_files
field insetup.py
(which was added by #3459 for thebdist
target).I would have preferred having the man page in the tarball's root directory or in
share/man/man.1/
, like the wheels, but that would have required copying the file viascript/build-and-sign.sh
first and deleting it again afterwards. Unfortunately, thedata_files
field which moves the man page toshare/man/man.1/
in the wheels doesn't work with distutil'ssdist
command, and it simply ignores the path override, as you can see here:https://github.com/python/cpython/blob/v3.9.1/Lib/distutils/command/sdist.py#L304-L307
On the CI side, everything is already in place from the bdist-manpage PR:
streamlink/.github/workflows/main.yml
Lines 155 to 156 in c5791f7
streamlink/.github/workflows/main.yml
Lines 165 to 168 in c5791f7