mirror of https://github.com/KLayout/klayout.git
create py.typed for python module (PEP 561)
This commit is contained in:
parent
6369a1f993
commit
d30199fe26
|
|
@ -58,6 +58,9 @@ src/klayout.pro.user
|
||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
|
|
||||||
|
# python type hints
|
||||||
|
py.typed
|
||||||
|
|
||||||
# IDEs
|
# IDEs
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,3 +19,4 @@ include src/plugins/*/db_plugin/*.h
|
||||||
include src/plugins/*/*/db_plugin/*.h
|
include src/plugins/*/*/db_plugin/*.h
|
||||||
recursive-include src/plugins/common *.h
|
recursive-include src/plugins/common *.h
|
||||||
include version.sh
|
include version.sh
|
||||||
|
include src/py.typed
|
||||||
2
setup.py
2
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 typing import List
|
||||||
from setuptools import setup, Distribution, find_packages
|
from setuptools import setup, Distribution, find_packages
|
||||||
from setuptools.extension import Extension, Library
|
from setuptools.extension import Extension, Library
|
||||||
|
from pathlib import Path
|
||||||
import glob
|
import glob
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
@ -904,6 +905,7 @@ lay = Extension(config.root + '.laycore',
|
||||||
# Core setup function
|
# Core setup function
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
(Path(__file__).parent / "src/py.typed").touch()
|
||||||
setup(
|
setup(
|
||||||
name=config.root,
|
name=config.root,
|
||||||
version=config.version(),
|
version=config.version(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue