Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: Make user-plugins work with package directories
Make the user-plugins system work with plugins that come as a package, for example the Klipper Shake&Tune plugin. Testing: Installed Shake&Tune, move the directory from `extras/` to `plugins/`. Without the fix the plugin could no longer be found. ```bash pi@uku:~/klipper/klippy $ ls -laR plugins/shaketune/ plugins/shaketune/: total 56 drwxr-xr-x 6 pi pi 4096 Jul 29 20:53 . drwxr-xr-x 7 pi pi 4096 Jul 29 20:53 .. drwxr-xr-x 3 pi pi 4096 Jul 29 20:53 commands -rw-r--r-- 1 pi pi 4245 Jun 19 19:15 dummy_macros.cfg drwxr-xr-x 3 pi pi 4096 Jul 29 20:53 graph_creators drwxr-xr-x 3 pi pi 4096 Jun 19 19:23 helpers -rw-r--r-- 1 pi pi 766 Jun 14 21:58 __init__.py drwxr-xr-x 2 pi pi 4096 Jul 29 20:53 __pycache__ -rw-r--r-- 1 pi pi 2424 Jun 14 21:58 shaketune_config.py -rw-r--r-- 1 pi pi 4403 Jun 19 19:15 shaketune_process.py -rw-r--r-- 1 pi pi 8141 Jul 29 20:53 shaketune.py ``` With the fix Shake&Tune would be correctly loaded. Also verified that regular plugins still work using TMC autotune plugin: ```bash pi@uku:~/klipper/klippy $ ls -laR plugins/*.py lrwxrwxrwx 1 pi pi 45 Jun 12 20:41 plugins/autotune_tmc.py -> ../../../klipper_tmc_autotune/autotune_tmc.py -rw-r--r-- 1 pi pi 179 Jun 12 18:48 plugins/__init__.py lrwxrwxrwx 1 pi pi 48 Jun 12 20:41 plugins/motor_constants.py -> ../../../klipper_tmc_autotune/motor_constants.py ```
- Loading branch information