Skip to content

Conversation

@bastimeyer
Copy link
Member

@bastimeyer bastimeyer commented Jan 24, 2021

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 the data_files field in setup.py (which was added by #3459 for the bdist 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 via script/build-and-sign.sh first and deleting it again afterwards. Unfortunately, the data_files field which moves the man page to share/man/man.1/ in the wheels doesn't work with distutil's sdist 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

$ python setup.py sdist
$ tar -tzf dist/streamlink-2.0.0+25.g815262d.tar.gz | grep 'streamlink.1'
streamlink-2.0.0+25.g815262d/docs/_build/man/streamlink.1

On the CI side, everything is already in place from the bdist-manpage PR:

@gravyboat
Copy link
Member

Looks good, thanks @bastimeyer.

@gravyboat gravyboat merged commit 7a74e18 into streamlink:master Jan 24, 2021
@bastimeyer bastimeyer deleted the sdist/manpage branch January 25, 2021 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inclusion of prebuilt manpages in release tarballs

2 participants