# th2 gRPC common library
This library contains common proto messages that are used in all th2 components. See [common.proto](https://github.com/th2-net/th2-grpc-common/blob/master/src/main/proto/th2_grpc_common/common.proto "common.proto") file for details. <br>
Tool generates code from `.proto` files and uploads built packages (`.proto` files and generated code) to specified repositories.
## How to maintain project:
1. Make your changes.
2. Up version of Java package in `gradle.properties` file.
3. Up version of Python package in `package_info.json` file.
4. Commit everything.
### Java
If you wish to manually create and publish package for Java, run these command:
```
gradle --no-daemon clean build publish artifactoryPublish \
-Pbintray_user=${BINTRAY_USER} \
-Pbintray_key=${BINTRAY_KEY}
```
`BINTRAY_USER` and `BINTRAY_KEY` are parameters for publishing.
### Python
If you wish to manually create and publish package for Python:
1. Generate services from `.proto` files:
- Download and build [th2 Python service generator](https://github.com/th2-net/th2-python-service-generator "th2-python-service-generator") project with Gradle:
```
gradle clean build
```
- Run th2 Python service generator:
```
java -jar {path_to_jar} -p src/main/proto/{package_name} -w PythonServiceWriter -o src/gen/main/python/{package_name}
```
2. Generate code from `.proto` files and publish everything:
```
pip install -r requirements.txt
python setup.py generate
python setup.py sdist
twine upload --repository-url ${PYPI_REPOSITORY_URL} --username ${PYPI_USER} --password ${PYPI_PASSWORD} dist/*
```
`PYPI_REPOSITORY_URL`, `PYPI_USER` and `PYPI_PASSWORD` are parameters for publishing.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共14个文件
py:4个
txt:4个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:th2_grpc_common-3.0.0.dev517959158.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源详情
资源评论
资源推荐
收起资源包目录
th2_grpc_common-3.0.0.dev517959158.tar.gz (14个子文件)
th2_grpc_common-3.0.0.dev517959158
PKG-INFO 2KB
package_info.json 82B
th2_grpc_common
common_pb2_grpc.py 159B
common.proto 5KB
common_pb2.py 69KB
__init__.py 0B
th2_grpc_common.egg-info
PKG-INFO 2KB
requires.txt 21B
SOURCES.txt 352B
top_level.txt 17B
dependency_links.txt 1B
setup.cfg 38B
setup.py 4KB
README.md 2KB
共 14 条
- 1
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0