mirror of
https://github.com/clearml/clearml
synced 2025-01-31 17:17:00 +00:00
Ignore local modules imported from a folder inside the git project
This commit is contained in:
parent
172ed62d41
commit
6de3d4b6fd
@ -52,6 +52,12 @@ class GenerateReqs(object):
|
||||
# add local modules, so we know what is used but not installed.
|
||||
for name in self._local_mods:
|
||||
if name in modules:
|
||||
# if this is a folder of our project, we can safely ignore it
|
||||
if os.path.commonpath([os.path.realpath(self._project_path)]) == \
|
||||
os.path.commonpath([os.path.realpath(self._project_path),
|
||||
os.path.realpath(self._local_mods[name])]):
|
||||
continue
|
||||
|
||||
relpath = os.path.relpath(self._local_mods[name], self._project_path)
|
||||
if not relpath.startswith('.'):
|
||||
relpath = '.' + os.path.sep + relpath
|
||||
|
Loading…
Reference in New Issue
Block a user