1

I added a file to my project which is a symlink to a file in another git project. I followed the steps in this answer https://stackoverflow.com/a/27770463/3573182 to add the other project as a submodule in my project.

Now the link I added to the file has some broken imports. Let's say my project A's structure is like this (including the structure of the submodule from project B):

Project A:
- package1:
-- link.py
- submodule-of-project-B
-- package1:
--- linked_file.py
-- package2
-- package3

Now the 'linked_file.py' has some imports from 'package2' which is a package inside project B. But because project A doesn't have that package so the imports inside the link are broken and I cannot run project A. I know I can change the imports from import package2 to import submodule.package2. But because this is a link, I think this will change the import line in the original file in project B which will make it broken there.

I used a link because in the future I need any update in the original file from its developers to be immediately reflected in my project.

Ahmedn1
  • 626
  • 1
  • 9
  • 20

0 Answers0