From 60e1218d400eec7f76666130485c557e8dbed196 Mon Sep 17 00:00:00 2001
From: Ovizro <1746672572@qq.com>
Date: Wed, 16 Aug 2023 23:02:09 +0800
Subject: [PATCH] fixed missing pyi files in python wheel

---
 .gitignore        | 9 +++++++++
 py_grpc/README.md | 2 +-
 py_grpc/setup.py  | 2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..73485370
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+/py_grpc/build/
+/py_grpc/dist/
+/py_grpc/tinode_grpc/GIT_VERSION
+*.egg-info/
\ No newline at end of file
diff --git a/py_grpc/README.md b/py_grpc/README.md
index a26e08b9..c47c63bf 100644
--- a/py_grpc/README.md
+++ b/py_grpc/README.md
@@ -19,6 +19,6 @@ pip install tinode_grpc
 
 Don't modify included files directly. If you want to make changes, you have to install protobuffers tool chain and gRPC then generate the Python bindings from [`pbx/model.proto`](https://github.com/tinode/chat/tree/master/pbx/model.proto) (your path to `model.proto` may be different):
 ```
-python -m grpc_tools.protoc -I../pbx --python_out=. --grpc_python_out=. ../pbx/model.proto
+python -m grpc_tools.protoc -I../pbx --python_out=. --pyi_out=. --grpc_python_out=. ../pbx/model.proto
 ```
 The generated `model_pb2_grpc.py` imports `model_pb2.py` as a module instead of a package which is incompatible with python3 packaging system. Use `../pbx/py_fix.py` to apply a fix. This is only needed if you want to repackage the generated files.
diff --git a/py_grpc/setup.py b/py_grpc/setup.py
index 59d3fb05..30c6abaa 100644
--- a/py_grpc/setup.py
+++ b/py_grpc/setup.py
@@ -23,7 +23,7 @@ setuptools.setup(
     license="Apache 2.0",
     keywords="chat messaging messenger im tinode",
     package_data={
-        "": ["GIT_VERSION"],
+        "": ["GIT_VERSION", "*.pyi"],
     },
     classifiers=[
         "Programming Language :: Python :: 2",
-- 
GitLab