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

Skip to content

build: include py.typed in package_data#5141

Merged
gravyboat merged 1 commit into
streamlink:masterfrom
bastimeyer:build/include-py.typed
Feb 4, 2023
Merged

build: include py.typed in package_data#5141
gravyboat merged 1 commit into
streamlink:masterfrom
bastimeyer:build/include-py.typed

Conversation

@bastimeyer

Copy link
Copy Markdown
Member

py.typed should be included in setuptools' package_data, so it gets included in the source and binary distributions, so 3rd party applications can read Streamlink's typing informations (PEP 561). #4544 didn't include it when the file was added, because it was just meant to enable mypy back then (an incorrect decision).

The file of the streamlink_cli package is explicitly not included here, since that package is not considered a public interface, only the streamlink package is, hence the split of the two packages.

$ curl -sSL 'https://files.pythonhosted.org/packages/9e/0c/b8c90cda86583a141dcc584eb32838ed312fb8cd9d5aab20faaa7f49d5fb/streamlink-5.2.1.tar.gz' \
  | bsdtar -tf - \
  | grep py.typed
$ echo $?
1

$ python -m build --sdist --wheel >/dev/null 2>&1
$ bsdtar -tf dist/streamlink-*ga1b72436*.whl | grep py.typed
streamlink/py.typed
$ bsdtar -tf dist/streamlink-*ga1b72436*.tar.gz | grep py.typed
streamlink-5.2.1+10.ga1b72436/src/streamlink/py.typed

@gravyboat gravyboat merged commit 96627e7 into streamlink:master Feb 4, 2023
@bastimeyer bastimeyer deleted the build/include-py.typed branch February 4, 2023 21:38
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.

2 participants