Add benchmark app to openvino-dev package (#5135)

* Add openvino-tools package (benchmark_app)

* Add openvino-tools package (benchmark_app)

* entry point for benchmark_app

* use find_namespace_packages to search

* Add progress package in openvino-dev requirements list

* Define Apache Software License  license, add openvino to install_requires

* remove unused module
This commit is contained in:
Sergey Lyubimtsev
2021-04-19 12:50:57 +03:00
committed by GitHub
parent b751683c82
commit b92fa8f303
4 changed files with 53 additions and 4 deletions

View File

@@ -25,3 +25,4 @@ fast-ctc-decode>=0.2
rawpy>=0.15
nltk>=3.5
opencv-python>=4.4
progress==1.5

View File

@@ -17,6 +17,7 @@ console_scripts =
pot=app.run:main
accuracy_check=accuracy_checker.main:main
convert_annotation=accuracy_checker.annotation_converters.convert:main
benchmark_app=openvino.tools.benchmark.main:main
[metadata]
license_files =

View File

@@ -11,7 +11,7 @@ from distutils.command.install import install
from distutils.command.build import build
from distutils.errors import DistutilsSetupError
from distutils.file_util import copy_file
from setuptools import setup, find_packages, Extension
from setuptools import setup, find_namespace_packages, Extension
from setuptools.command.build_ext import build_ext
from setuptools.command.build_clib import build_clib
from decouple import config
@@ -225,10 +225,10 @@ def set_rpath(rpath, executable):
rpath_tool = ""
if sys.platform == "linux":
rpath_tool = "patchelf"
cmd = [rpath_tool, "--set-rpath", rpath, executable]
cmd = [rpath_tool, "--set-rpath", rpath, executable]
elif sys.platform == "darwin":
rpath_tool = "install_name_tool"
cmd = [rpath_tool, "-add_rpath", rpath, executable]
cmd = [rpath_tool, "-add_rpath", rpath, executable]
else:
sys.exit(f"Unsupported platform: {sys.platform}")
@@ -316,7 +316,7 @@ package_license = config('WHEEL_LICENSE', '')
if os.path.exists(package_license):
copyfile(package_license, "LICENSE")
packages = find_packages(','.join(get_dir_list(PY_INSTALL_CFG)))
packages = find_namespace_packages(','.join(get_dir_list(PY_INSTALL_CFG)))
package_data = {}
setup(

47
tools/setup.py Normal file
View File

@@ -0,0 +1,47 @@
#!/usr/bin/env python3
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""
Use this script to create a wheel with OpenVINO™ Python* tools:
$ python setup.py sdist bdist_wheel
"""
from setuptools import setup, find_packages
with open('README.md', 'r', encoding='utf-8') as f:
long_description = f.read()
with open('benchmark/requirements.txt') as f:
required = f.read().splitlines()
required.extend(['openvino'])
pkgs = find_packages()
NAMESPACE = 'openvino.tools'
setup(
name='openvino-tools',
version='0.0.0',
author='Intel® Corporation',
license='OSI Approved :: Apache Software License',
author_email='openvino_pushbot@intel.com',
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',
'OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
package_dir={''.join((NAMESPACE, '.', pkg)) : pkg.replace('.', '/')
for pkg in pkgs},
packages=[''.join((NAMESPACE, '.', pkg)) for pkg in pkgs],
install_requires=required,
python_requires='>=3.6',
)