Merge pull request #1221 from sebastian-goeldi/master

create py.typed for python module (PEP 561)
This commit is contained in:
Matthias Köfferlein 2022-12-13 21:49:03 +01:00 committed by GitHub
commit 798b10c999
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

3
.gitignore vendored
View File

@ -58,6 +58,9 @@ src/klayout.pro.user
build/
dist/
# python type hints
py.typed
# IDEs
.vscode

View File

@ -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

View File

@ -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(),