Thanks to visit codestin.com
Credit goes to github.com

Skip to content

build: include man page in wheels#3459

Merged
back-to merged 1 commit into
streamlink:masterfrom
bastimeyer:wheels/manpage
Dec 30, 2020
Merged

build: include man page in wheels#3459
back-to merged 1 commit into
streamlink:masterfrom
bastimeyer:wheels/manpage

Conversation

@bastimeyer

Copy link
Copy Markdown
Member

Resolves #1753

This adds the man page, if it exists, to wheels via the data_files keyword:
https://setuptools.readthedocs.io/en/latest/references/keywords.html

The data_files keyword is marked as deprecated, but there doesn't seem to be another way of mapping files from one path to another in the distribution file. What it says about not being supported by wheels is wrong. package_data doesn't seem to work here without changing build scripts. At least I wasn't able to make it work.

sdist does not include any data_files.

Regarding the manpages themselves, it might be necessary on some systems to extend the MANPATH env var with MANPATH="${XDG_DATA_HOME:-$HOME/.local/share}/man:$MANPATH" so that it looks up man pages in $XDG_DATA_HOME/man (which defaults to $HOME/.local/share/man) too.

To validate the changes:

$ make --directory=docs clean
$ python setuptools.py bdist_wheel
$ unzip -l dist/streamlink-2.0.0+10.gc6a1806-py3-none-any.whl | grep share/man/man1/streamlink.1

$ make --directory=docs clean man
$ python setuptools.py bdist_wheel
$ unzip -l dist/streamlink-2.0.0+10.gc6a1806-py3-none-any.whl | grep share/man/man1/streamlink.1
    49409  2020-12-28 12:05   streamlink-2.0.0+10.gc6a1806.data/data/share/man/man1/streamlink.1
$ pip install ./dist/streamlink-2.0.0+10.gc6a1806-py3-none-any.whl
$ ls ~/.local/share/man/man1/streamlink.1 
/home/basti/.local/share/man/man1/streamlink.1

@bastimeyer

Copy link
Copy Markdown
Member Author

Btw, the man page itself should probably be changed, as it currently includes the entire cli.rst docs page, which is technically not a man page:

streamlink/docs/conf.py

Lines 184 to 186 in 009bbd8

man_pages = [
('cli', 'streamlink', 'extracts streams from various services and pipes them into a video player of choice', ['Streamlink Contributors'], 1)
]

@back-to back-to merged commit 97205d2 into streamlink:master Dec 30, 2020
@bastimeyer bastimeyer deleted the wheels/manpage branch January 19, 2021 23:19
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.

No man page with pip install

2 participants