diff options
author | Chandan Singh <chandan@chandansingh.net> | 2020-08-03 20:49:05 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-08-04 21:53:07 +0000 |
commit | b04dfb2be1c72c792353304d54a89aa61cb9596d (patch) | |
tree | 2ffcfc72c48c49425a6ee6e29b0415060c4701cf | |
parent | 650a5127602a9c9eefea0d3f2121c04b4c957f18 (diff) | |
download | buildstream-b04dfb2be1c72c792353304d54a89aa61cb9596d.tar.gz |
Publish our type annotationschandan/publish-types
As defined by PEP 561 (https://www.python.org/dev/peps/pep-0561), add a
`py.typed` file to the BuildStream package. This allows any downstream
packages (currently plugins, maybe other use cases in future) to run
type checkers against BuildStream as well.
Although we don't have type hints for the private API surface,
downstream packages should only be using public API anyway, so they
should mostly be fine.
-rwxr-xr-x | setup.py | 9 | ||||
-rw-r--r-- | src/buildstream/py.typed | 0 |
2 files changed, 8 insertions, 1 deletions
@@ -347,7 +347,14 @@ setup( package_dir={"": "src"}, packages=find_packages(where="src", exclude=("tests", "tests.*")), package_data={ - "buildstream": ["plugins/*/*.py", "plugins/*/*.yaml", "data/*.yaml", "data/*.sh.in", *list_testing_datafiles()] + "buildstream": [ + "py.typed", + "plugins/*/*.py", + "plugins/*/*.yaml", + "data/*.yaml", + "data/*.sh.in", + *list_testing_datafiles(), + ] }, data_files=[ # This is a weak attempt to integrate with the user nicely, diff --git a/src/buildstream/py.typed b/src/buildstream/py.typed new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/src/buildstream/py.typed |