From 4c467344715ebcb974c691a845a985887199ff5e Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Sat, 13 Apr 2024 16:54:11 +0200 Subject: [PATCH] Fix python release --- build-python.sh | 7 +++++++ .../__init__.py | 0 python/setup.py | 6 ++++-- 3 files changed, 11 insertions(+), 2 deletions(-) rename python/{openagents_service_provider_proto => openagents_grpc_proto}/__init__.py (100%) diff --git a/build-python.sh b/build-python.sh index 1a37b7a..be7d0bd 100644 --- a/build-python.sh +++ b/build-python.sh @@ -15,6 +15,13 @@ proto/*.proto cp -Rvf python/* build/python/ cd build/python +TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") +if [[ -n "$TAG" ]]; then + TAG=${TAG#v} + export TAG +else + export TAG="0.1" +fi if [ "$DEBUG" = "1" ] ; diff --git a/python/openagents_service_provider_proto/__init__.py b/python/openagents_grpc_proto/__init__.py similarity index 100% rename from python/openagents_service_provider_proto/__init__.py rename to python/openagents_grpc_proto/__init__.py diff --git a/python/setup.py b/python/setup.py index 9c36d07..e5575f0 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,8 +1,10 @@ from setuptools import setup, find_packages +import os +version = os.getenv('TAG', '0.1') setup( - name='openagents_service_provider_proto', - version='0.1', + name='openagents_grpc_proto', + version=version, packages=find_packages(), install_requires=[ 'protobuf==5.26.1',