Browse Source

setup: include shell completions in sdist

- move build directory of the shell completions from /build/shtab to
  /completions due to an sdist restriction of setuptools and MANIFEST.in
- recursively include the /completions directory in MANIFEST.in
- update data_files path in setup.py (for inclusion in wheels)
- update .gitignore
pull/4177/head
bastimeyer 2 months ago
committed by back-to
parent
commit
2eb9689fac
  1. 8
      .gitignore
  2. 1
      MANIFEST.in
  3. 2
      script/build-shell-completions.sh
  4. 4
      setup.py

8
.gitignore

@ -13,20 +13,23 @@ nbproject
*.sublime-workspace
.idea
/build/
/completions/
/docs/_build/
/dist/
*.mo
*.egg-info
*.egg
*.EGG
*.EGG-INFO
bin
build
build-win32
develop-eggs
downloads
eggs
fake-eggs
parts
dist
.installed.cfg
.mr.developer.cfg
.hg
@ -36,7 +39,6 @@ dist
*.pyo
*.tmp*
*.swp
docs/_build
include/
lib/
local/

1
MANIFEST.in

@ -7,6 +7,7 @@ include src/streamlink/_version.py
include src/streamlink/plugins/.removed
include versioneer.py
recursive-include completions *
recursive-include docs *
recursive-include examples *
recursive-include tests *

2
script/build-shell-completions.sh

@ -3,7 +3,7 @@ set -e
ROOT=$(git rev-parse --show-toplevel 2>/dev/null || realpath "$(dirname "$(readlink -f "${0}")")/..")
DIST="${ROOT}/build/shtab"
DIST="${ROOT}/completions"
PYTHON_DEPS=(streamlink_cli shtab)
declare -A COMPLETIONS=(

4
setup.py

@ -63,8 +63,8 @@ data_files = [
# shell completions
# requires pre-built completion files via shtab (dev-requirements.txt)
# `./script/build-shell-completions.sh`
("share/bash-completion/completions", ["build/shtab/bash/streamlink"]),
("share/zsh/site-functions", ["build/shtab/zsh/_streamlink"]),
("share/bash-completion/completions", ["completions/bash/streamlink"]),
("share/zsh/site-functions", ["completions/zsh/_streamlink"]),
# man page
# requires pre-built man page file via sphinx (docs-requirements.txt)
# `make --directory=docs clean man`

Loading…
Cancel
Save