diff --git a/.gitignore b/.gitignore index 8c62f3f05..6a41d55a6 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,9 @@ src/klayout.pro.user build/ dist/ +# python type hints +py.typed + # IDEs .vscode diff --git a/MANIFEST.in b/MANIFEST.in index e6b8ffd56..60133e032 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -19,3 +19,4 @@ include src/plugins/*/db_plugin/*.h include src/plugins/*/*/db_plugin/*.h recursive-include src/plugins/common *.h include version.sh +include src/py.typed \ No newline at end of file diff --git a/setup.py b/setup.py index 490f99e21..e24b6e798 100644 --- a/setup.py +++ b/setup.py @@ -57,6 +57,7 @@ and won't find them. So we need to take away the path with from typing import List from setuptools import setup, Distribution, find_packages from setuptools.extension import Extension, Library +from pathlib import Path import glob import os import re @@ -904,6 +905,7 @@ lay = Extension(config.root + '.laycore', # Core setup function if __name__ == "__main__": + (Path(__file__).parent / "src/py.typed").touch() setup( name=config.root, version=config.version(),