I'm trying to import a github python directory, which is not on PyPi, and I am attempting to develop an addon for blender. I cannot use the method which automatically downloads dependencies because of this, so I have to work within a folder that acts as my addon's "zip" folder.
However the alternative method to import dependencies requires a direct filepath, so I need to get the working file directory of the addon/script.py file while testing the addon in blender (so I don't have to reinstall the addon for every minor change):
path = pathlib.Path(bpy.data.filepath)
myProjects_dir = path.parent.parent.parent.resolve()
myProjects_dir = str(myProjects_dir)
print(myProjects_dir)
but this just prints the blender install directory folder. Every variation of this using abspath or os.path.realpath, which end up either being a blank line, /, or /Script.py, with no actual path or parent directory listed.
How am I supposed to actively write a blender addon if I cannot test it in the editor with one click? Am I really expected to have to install and uninstall the addon every time?