From b04dfb2be1c72c792353304d54a89aa61cb9596d Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Mon, 3 Aug 2020 20:49:05 +0000 Subject: Publish our type annotations 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. --- setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index c300d33e9..930c9de40 100755 --- a/setup.py +++ b/setup.py @@ -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, -- cgit v1.2.1