Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MO] move importlib-metadata into setup.py #10319

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tools/mo/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 4 additions & 4 deletions tools/mo/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down