Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[PyOV] Migrate benchmark_app from `setup.py` to `pyproject.toml` (#27305)

Przemyslaw Wysocki05c365c5e4fd
diff --git a/tools/benchmark_tool/pyproject.toml b/tools/benchmark_tool/pyproject.toml
new file mode 100644
index 00000000000..61fe23ffbbf
--- /dev/null
+++ b/tools/benchmark_tool/pyproject.toml
@@ -0,0 +1,31 @@
+# Copyright (C) 2018-2024 Intel Corporation
+# SPDX-License-Identifier: Apache-2.0
+
+# Use this configuration file to create a wheel with OpenVINO™ Python* benchmark tool:
+# $ python -m pip wheel . --no-deps
+
+[build-system]
+requires = ["setuptools", "wheel"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "benchmark_tool"
+version = "0.0.0"
+description = "OpenVINO™ Python* tools package"
+readme = "README.md"
+authors = [
+ {name = "Intel® Corporation", email = "[email protected]"}
+]
+urls = {homepage = "https://github.com/openvinotoolkit/openvino"}
+classifiers = [
+ "Programming Language :: Python :: 3",
+ "Operating System :: OS Independent",
+ "License :: OSI Approved :: Apache Software License"
+]
+requires-python = ">=3.9"
+dependencies = [
+ "numpy>=1.16.6,<2.2.0",
+]
+
+[project.scripts]
+benchmark_app = "openvino.tools.benchmark.main:main"
diff --git a/tools/benchmark_tool/requirements.txt b/tools/benchmark_tool/requirements.txt
deleted file mode 100644
index 5594ff31cd3..00000000000
--- a/tools/benchmark_tool/requirements.txt
+++ /dev/null
@@ -1 +0,0 @@
-numpy>=1.16.6,<2.1.0
diff --git a/tools/benchmark_tool/setup.py b/tools/benchmark_tool/setup.py
deleted file mode 100644
index 98f2a369a60..00000000000
--- a/tools/benchmark_tool/setup.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python3
-
-# Copyright (C) 2018-2024 Intel Corporation
-# SPDX-License-Identifier: Apache-2.0
-
-"""
-Use this script to create a wheel with OpenVINO™ Python* tools:
-
-$ python -m pip wheel .
-"""
-from setuptools import setup, find_packages
-
-
-with open('requirements.txt', 'r', encoding='utf-8') as f:
- raw_contents = f.readlines()
- reqs = [line.strip() for line in raw_contents]
-
-with open('README.md', 'r', encoding='utf-8') as f:
- long_description = f.read()
-
-setup(
- name='benchmark_tool',
- version='0.0.0',
- author='Intel® Corporation',
- license='OSI Approved :: Apache Software License',
- author_email='[email protected]',
- url='https://github.com/openvinotoolkit/openvino',
- description='OpenVINO™ Python* tools package',
- long_description=long_description,
- long_description_content_type='text/markdown',
- entry_points={
- 'console_scripts': [
- 'benchmark_app = openvino.tools.benchmark.main:main'],
- },
- classifiers=[
- 'Programming Language :: Python :: 3',
- 'Operating System :: OS Independent',
- ],
- packages=find_packages(),
- install_requires=reqs,
- data_files=[('.', ['requirements.txt'])],
- python_requires='>=3.9',
-)