We have a python library that needs to be shared between many projects, and we are trying to find a way to organize and associate a common library with specific projects that want to use it.
It should also work without a visual studio, which means that if the entire project is moved to another machine, it will still work and use the "shared library", which means that the linked library must be statically placed in every project that uses it ( and, of course, every time it is updated, the library catalog will be updated in each project)
Can this be done?
The directory structure is as follows:
Project1 main.py <--- (One of the projects that uses the library) ... Libs PyLib <--- (This is the shared library) __init__.py ps_lib.py another.py CWinLib CNixLib
Some testing methods:
Work with related files. The problem is that it does not copy the entire package to the project (which means that it does not work outside the visual studio)
Adding a search path - the same problem as before, does not work outside the visual studio
Using sys.path.append means that we need to copy the exact directory structure that is in place, and that is what I want to avoid.
Is there any other way to solve this problem?
Drxxd source share