[MO][Install] Clean up setup (#15011)

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
This commit is contained in:
Roman Kazantsev 2023-01-10 00:13:15 +04:00 committed by GitHub
parent af6ed211d6
commit 87d777c192
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 16 deletions

View File

@ -2,4 +2,5 @@ numpy>=1.16.6
networkx~=2.5; python_version <= "3.6" networkx~=2.5; python_version <= "3.6"
networkx<=2.8.8; python_version > "3.6" networkx<=2.8.8; python_version > "3.6"
defusedxml>=0.7.1 defusedxml>=0.7.1
importlib-metadata; python_version < "3.8" and sys_platform == 'win32'
openvino-telemetry>=2022.1.0 openvino-telemetry>=2022.1.0

View File

@ -41,20 +41,6 @@ py_modules.append(prefix.replace('/', '.') + 'convert')
py_modules.append(prefix.replace('/', '.') + 'convert_impl') py_modules.append(prefix.replace('/', '.') + 'convert_impl')
py_modules.append(prefix.replace('/', '.') + '__main__') py_modules.append(prefix.replace('/', '.') + '__main__')
# Minimal set of dependencies
deps_whitelist = ['networkx', 'defusedxml', 'numpy', 'openvino-telemetry']
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): class InstallCmd(install):
def run(self): def run(self):
install.run(self) install.run(self)
@ -117,5 +103,5 @@ setup(
"License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent", "Operating System :: OS Independent",
], ],
install_requires=deps, install_requires=read_text('requirements.txt'),
) )