From 1108cb9468fc45ca5407f7c821abdfd7268a59bc Mon Sep 17 00:00:00 2001 From: Cheng Peng Date: Wed, 13 Sep 2023 18:35:41 -0700 Subject: [PATCH] add stub file generation and installation --- generate_stubs.py | 9 +++++++++ sophus_pybind-stubs/pyproject.toml | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 generate_stubs.py create mode 100644 sophus_pybind-stubs/pyproject.toml diff --git a/generate_stubs.py b/generate_stubs.py new file mode 100644 index 00000000..e964a014 --- /dev/null +++ b/generate_stubs.py @@ -0,0 +1,9 @@ +import subprocess + +subprocess.run("mkdir -p sophus_pybind-stubs/sophus_pybind", shell=True, check=True) + +subprocess.run( + "pybind11-stubgen sophus_pybind -o sophus_pybind-stubs/sophus_pybind", + shell=True, + check=True, +) diff --git a/sophus_pybind-stubs/pyproject.toml b/sophus_pybind-stubs/pyproject.toml new file mode 100644 index 00000000..6d8896b8 --- /dev/null +++ b/sophus_pybind-stubs/pyproject.toml @@ -0,0 +1,14 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "sophus-pybind-stubs" +version = "1.22.10" +description = "Stubs for sophus-pybind" + +[tool.setuptools.packages.find] +where = ["./"] + +[tool.setuptools.package-data] +"*" = ["*.pyi"]