IDAPython adds <IDA installation path>/python to sys.path by default, and some plugins use this scheme in deployment. (e.g. Ghidra <-> IDA converter) One can just move python/* to package root, but I'm not sure if this is a good way. (It works, and doesn't conflict commonly, but if some files like setup.py exists and some package uses import setup or etc, it does matter.)
Here, I like the approach of idaenv which tries to wrap all packages as a python (ex. IDArling supports idaenv). Using setup.py or other setuptools/distutils module enables reusing python's package management system. (One can pip install ./idarling/ or etc though)
Currently idapkg adds package root to sys.path, and I'm not sure if it's a good way.
Some path candidates that can be added to sys.path (but not sure what's best):
IDAPython adds
<IDA installation path>/python
to sys.path by default, and some plugins use this scheme in deployment. (e.g. Ghidra <-> IDA converter) One can just move python/* to package root, but I'm not sure if this is a good way. (It works, and doesn't conflict commonly, but if some files likesetup.py
exists and some package usesimport setup
or etc, it does matter.)Here, I like the approach of idaenv which tries to wrap all packages as a python (ex. IDArling supports idaenv). Using setup.py or other setuptools/distutils module enables reusing python's package management system. (One can
pip install ./idarling/
or etc though)