From 786643e95690fbe08da6dc66fa43a2a1e851b0b3 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Sun, 29 Sep 2024 08:14:53 -0700 Subject: [PATCH] Mark Python wheel as containing type hints __init__.py has type hints, but type checkers will ignore these when checking OpenSlide Python unless we add py.typed. Also add Trove classifier, by convention. Signed-off-by: Benjamin Gilbert --- artifacts/python/meson.build | 1 + artifacts/python/py.typed | 0 artifacts/python/pyproject.in.toml | 1 + 3 files changed, 2 insertions(+) create mode 100644 artifacts/python/py.typed diff --git a/artifacts/python/meson.build b/artifacts/python/meson.build index 396edcd3..d233ce70 100644 --- a/artifacts/python/meson.build +++ b/artifacts/python/meson.build @@ -13,6 +13,7 @@ py_artifacts = [ input : '__init__.in.py', output : '__init__.py', ), + files('py.typed'), libopenslide_postprocessed, licenses, ] diff --git a/artifacts/python/py.typed b/artifacts/python/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/artifacts/python/pyproject.in.toml b/artifacts/python/pyproject.in.toml index dfdf7c6a..d6470af4 100644 --- a/artifacts/python/pyproject.in.toml +++ b/artifacts/python/pyproject.in.toml @@ -25,6 +25,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering :: Bio-Informatics", + "Typing :: Typed", ] requires-python = ">= 3.8"