From 0454ffcdf450fe265ecfa1d1ce866d41da84a08f Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Mon, 31 May 2021 15:44:11 +0300 Subject: [PATCH] Add optional ignored packages in script requirements (currently used for pywin32) --- clearml/backend_interface/task/repo/scriptinfo.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clearml/backend_interface/task/repo/scriptinfo.py b/clearml/backend_interface/task/repo/scriptinfo.py index e28b5713..ce4c2f3a 100644 --- a/clearml/backend_interface/task/repo/scriptinfo.py +++ b/clearml/backend_interface/task/repo/scriptinfo.py @@ -27,6 +27,7 @@ class ScriptInfoError(Exception): class ScriptRequirements(object): _max_requirements_size = 512 * 1024 _packages_remove_version = ('setuptools', ) + _ignore_packages = ('pywin32',) def __init__(self, root_folder): self._root_folder = root_folder @@ -170,6 +171,8 @@ class ScriptRequirements(object): # requirement summary requirements_txt += '\n' for k, v in reqs.sorted_items(): + if k.lower() in ScriptRequirements._ignore_packages: + continue version = v.version if k in forced_packages: forced_version = forced_packages.pop(k, None)