Skip to content

Commit

Permalink
Add commit to WWB version (openvinotoolkit#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKoff88 authored Nov 6, 2024
1 parent 1fb7caf commit 475145c
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion tools/who_what_benchmark/setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
import os
import sys
from setuptools import find_packages, setup

with open("requirements.txt") as f:
required = f.read().splitlines()


is_installing_editable = "develop" in sys.argv
is_building_release = not is_installing_editable and "--release" in sys.argv


def set_version(base_version: str):
version_value = base_version
if not is_building_release:
if is_installing_editable:
return version_value + ".dev0+editable"
import subprocess # nosec

dev_version_id = "unknown_version"
try:
repo_root = os.path.dirname(os.path.realpath(__file__))
dev_version_id = (
subprocess.check_output(["git", "rev-parse", "--short", "HEAD"], cwd=repo_root) # nosec
.strip()
.decode()
)
except subprocess.CalledProcessError:
pass
return version_value + f".dev0+{dev_version_id}"

return version_value


setup(
name="whowhatbench",
version="1.0.0",
version=set_version("1.0.0"),
url="https://github.com/openvinotoolkit/openvino.genai.git",
author="Intel",
author_email="[email protected]",
Expand Down

0 comments on commit 475145c

Please sign in to comment.