summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChandan Singh <chandan@chandansingh.net>2020-08-03 20:49:05 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2020-08-04 21:53:07 +0000
commitb04dfb2be1c72c792353304d54a89aa61cb9596d (patch)
tree2ffcfc72c48c49425a6ee6e29b0415060c4701cf /setup.py
parent650a5127602a9c9eefea0d3f2121c04b4c957f18 (diff)
downloadbuildstream-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.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py9
1 files changed, 8 insertions, 1 deletions
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,