From fcda685927ae4b29a79e10eca051b48acbf46f71 Mon Sep 17 00:00:00 2001 From: Raul Farkas Date: Tue, 14 Mar 2023 15:19:46 +0000 Subject: MLBEDSW-4178: Add automatic tag handling * Add automatic tag handling when building source distribution. Change-Id: Ia20df463ae3eddf78de7e0b710c9c2279ddf61cd Signed-off-by: Raul Farkas --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 5a7a7fc1..6b7186bf 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ import re from setuptools import Extension from setuptools import setup from setuptools.command.build_ext import build_ext +from setuptools_scm import get_version class BuildExtension(build_ext): @@ -41,7 +42,7 @@ class BuildExtension(build_ext): this_directory = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f: long_description = f.read() - tag = "3.7.0" + tag = get_version() url = f"https://review.mlplatform.org/plugins/gitiles/ml/ethos-u/ethos-u-vela/+/refs/tags/{tag}/" # Find all markdown links that match the format: [text](link) for match, link in re.findall(r"(\[.+?\]\((.+?)\))", long_description): -- cgit v1.2.1