add pre-release description for wheels packages

This commit is contained in:
Sergey Lyubimtsev 2022-03-05 16:21:03 +03:00
parent 41818a377f
commit 7ceca771e3
3 changed files with 42 additions and 9 deletions

View File

@ -0,0 +1,2 @@
> **NOTE**: This version is pre-release software and has not undergone full release validation or qualification. No support is offered on pre-release software and APIs/behavior are subject to change. It should NOT be incorporated into any production software/solution and instead should be used only for early testing and integration while awaiting a final release version of this software.

View File

@ -27,7 +27,7 @@ WHEEL_LIBS_PACKAGE = 'openvino.libs'
PYTHON_VERSION = f'python{sys.version_info.major}.{sys.version_info.minor}'
LIBS_DIR = 'bin' if platform.system() == 'Windows' else 'lib'
CONFIG = 'Release' if platform.system() == 'Windows' or platform.system() == 'Darwin' else ''
CONFIG = 'Release' if platform.system() == 'Windows' else ''
machine = platform.machine()
if machine == 'x86_64' or machine == 'AMD64':
@ -427,6 +427,13 @@ def get_package_dir(install_cfg):
py_package_path = dirs[0]
return py_package_path
def concat_files(output_file, input_files):
with open(output_file, 'w', encoding='utf-8') as outfile:
for filename in input_files:
with open(filename, 'r', encoding='utf-8') as infile:
content = infile.read()
outfile.write(content)
return output_file
platforms = ['linux', 'win32', 'darwin']
if not any(pl in sys.platform for pl in platforms):
@ -442,6 +449,15 @@ package_data: typing.Dict[str, list] = {}
pkg_name = os.getenv('WHEEL_PACKAGE_NAME', 'openvino')
ext_modules = find_prebuilt_extensions(get_dir_list(PY_INSTALL_CFG)) if pkg_name == 'openvino' else []
description_md = SCRIPT_DIR.parents[3] / 'docs' / 'install_guides' / 'pypi-openvino-rt.md'
md_files = [description_md, SCRIPT_DIR.parents[3] / 'docs' / 'install_guides' / 'pre-release-note.md']
if(os.getenv('CI_BUILD_DEV_TAG')):
output = Path.cwd() / 'build' / 'pypi-openvino-rt.md'
output.parent.mkdir(exist_ok=True)
description_md = concat_files(output, md_files)
setup(
version=os.getenv('WHEEL_VERSION', '0.0.0'),
build=os.getenv('WHEEL_BUILD', '000'),
@ -451,7 +467,7 @@ setup(
author=os.getenv('WHEEL_AUTHOR', 'Intel(R) Corporation'),
description=os.getenv('WHEEL_DESC', 'OpenVINO(TM) Runtime'),
install_requires=get_dependencies(os.getenv('WHEEL_REQUIREMENTS', SCRIPT_DIR.parents[0] / 'requirements.txt')),
long_description=get_description(os.getenv('WHEEL_OVERVIEW', SCRIPT_DIR.parents[3] / 'docs/install_guides/pypi-openvino-rt.md')),
long_description=get_description(os.getenv('WHEEL_OVERVIEW', description_md)),
long_description_content_type='text/markdown',
download_url=os.getenv('WHEEL_DOWNLOAD_URL', 'https://github.com/openvinotoolkit/openvino/tags'),
url=os.getenv('WHEEL_URL', 'https://docs.openvino.ai/latest/index.html'),

View File

@ -205,17 +205,32 @@ with (SCRIPT_DIR / 'requirements.txt').open() as requirements:
in pkg_resources.parse_requirements(requirements)
]
def concat_files(output_file, input_files):
with open(output_file, 'w', encoding='utf-8') as outfile:
for filename in input_files:
with open(filename, 'r', encoding='utf-8') as infile:
content = infile.read()
outfile.write(content)
return output_file
description_md = SCRIPT_DIR.parents[1] / 'docs' / 'install_guides' / 'pypi-openvino-dev.md'
md_files = [description_md, SCRIPT_DIR.parents[1] / 'docs' / 'install_guides' / 'pre-release-note.md']
if(os.getenv('CI_BUILD_DEV_TAG')):
output = Path.cwd() / 'build' / 'pypi-openvino-dev.md'
output.parent.mkdir(exist_ok=True)
description_md = concat_files(output, md_files)
setup(
name='openvino-dev',
version=os.getenv('OPENVINO_VERSION', '0.0.0'),
author='Intel® Corporation',
license='OSI Approved :: Apache Software License',
author_email='openvino_pushbot@intel.com',
url='https://docs.openvino.ai/latest/index.html',
download_url='https://github.com/openvinotoolkit/openvino/tags',
description='OpenVINO(TM) Development Tools',
long_description=get_description(SCRIPT_DIR.parents[1] / 'docs/install_guides/pypi-openvino-dev.md'),
author=os.getenv('WHEEL_AUTHOR', 'Intel® Corporation'),
license=os.getenv('WHEEL_LICENCE_TYPE', 'OSI Approved :: Apache Software License'),
author_email=os.getenv('WHEEL_AUTHOR_EMAIL', 'openvino_pushbot@intel.com'),
url=os.getenv('WHEEL_URL', 'https://docs.openvino.ai/latest/index.html'),
download_url=os.getenv('WHEEL_DOWNLOAD_URL', 'https://github.com/openvinotoolkit/openvino/tags'),
description=os.getenv('WHEEL_DESC', 'OpenVINO(TM) Development Tools'),
long_description=get_description(os.getenv('WHEEL_OVERVIEW', description_md)),
long_description_content_type='text/markdown',
classifiers=[
'Programming Language :: Python :: 3',