aquasecurity / kube-hunter

Hunt for security weaknesses in Kubernetes clusters
Apache License 2.0
4.75k stars 585 forks source link

PyInstaller can't find dependecies of dynamiclly imported modules #290

Closed iyehuda closed 4 years ago

iyehuda commented 4 years ago

There is a common usage of dynamic import in __init__.py files to import every module inside a package dynamically. Tools like PyInstaller cannot find dependencies of dynamically loaded modules. The usage of dynamic imports is not justified since it is not made conditionally. We should decrease its usage as a practice and standardize the way kube-hunter is built with PyInstaller (e.g, supply it with dependencies dynamically using external wrapper).

iyehuda commented 4 years ago

Solved in #302 Now we can run python setup.py pyinstaller to build with PyInstaller