From 121d59aa80a9e1be619da424190e3e3ab7801568 Mon Sep 17 00:00:00 2001 From: Pavel Esir Date: Tue, 15 Feb 2022 15:01:27 +0300 Subject: [PATCH] [MO] move importlib-metadata into setup.py (#10319) * handle 'and' marker in requirements * Revert "handle 'and' marker in requirements" This reverts commit 952bb949caed516db4e1eb79b38a23a5b7473381. * moved importlib-metadata from requirements.txt into setup.py --- tools/mo/requirements.txt | 1 - tools/mo/setup.py | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/mo/requirements.txt b/tools/mo/requirements.txt index 0930fb079bc4f7..6567765ad9b09e 100644 --- a/tools/mo/requirements.txt +++ b/tools/mo/requirements.txt @@ -11,4 +11,3 @@ urllib3>=1.26.4 requests>=2.25.1 fastjsonschema~=2.15.1 openvino-telemetry>=2022.1.0 -importlib-metadata; python_version < "3.8" and sys_platform == "win32" \ No newline at end of file diff --git a/tools/mo/setup.py b/tools/mo/setup.py index 6a85fd6b6e86e3..8b949b658af258 100644 --- a/tools/mo/setup.py +++ b/tools/mo/setup.py @@ -42,16 +42,16 @@ def read_text(path): # Minimal set of dependencies deps_whitelist = ['networkx', 'defusedxml', 'numpy', 'openvino-telemetry'] -# for py37 and less on Windows need importlib-metadata in order to use entry_point *.exe files -if sys.platform == 'win32' and sys.version_info[1] < 8: - deps_whitelist.append('importlib-metadata') - deps = [] with open('requirements.txt', 'rt') as req_file: for line in req_file.read().split('\n'): if line.startswith(tuple(deps_whitelist)): deps.append(line) +# for py37 and less on Windows need importlib-metadata in order to use entry_point *.exe files +if sys.platform == 'win32' and sys.version_info[1] < 8: + deps.append('importlib-metadata') + class InstallCmd(install): def run(self):