Skip to content

Commit

Permalink
[MO] move importlib-metadata into setup.py (openvinotoolkit#10319)
Browse files Browse the repository at this point in the history
* handle 'and' marker in requirements

* Revert "handle 'and' marker in requirements"

This reverts commit 952bb94.

* moved importlib-metadata from requirements.txt into setup.py
  • Loading branch information
pavel-esir authored Feb 15, 2022
1 parent f1557c0 commit 121d59a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
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

0 comments on commit 121d59a

Please sign in to comment.